Pages: « 1 2 3 »
  Print  
Author Topic: Can't rename a resource under linux KDE  (Read 6130 times)
Offline (Male) Goombert
Reply #15 Posted on: June 07, 2014, 01:37:06 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
Ok, as you said the exception is a bug in the JDK as a result of having a hidden button on the toolbar, the issue lies in the FocusTraversalPolicy. I have attempted to patch it by simply removing the button altogether from the toolbar until we are ready to add it. Please update and test.

You can rerun python install.py or you may also manually redownload the new plugin and LGM jars and replace them.
http://www.enigma-dev.org/docs/Wiki/Install:Extra_Packages
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #16 Posted on: June 07, 2014, 02:48:43 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
Robert, thanks a lot for you help, but are you sure you committed correctly your modification ?
To be sure, i did a new clean install (i deleted the enigma-dev folder), and i've still the error, but it seems the code for the button is still here. If i open in the enigma.jar file the EnigmaRunner.java file, the code for the button is still here:

Code: [Select]
public JMenuItem busy, run, debug, design, compile, rebuild, stop;
public JButton stopb, runb, debugb, compileb;

Code: [Select]
stop.setVisible(false);
stopb.setVisible(false);

Code: [Select]
public void populateMenu()
{
stopb = new JButton(); //$NON-NLS-1$
stopb.addActionListener(this);
stopb.setToolTipText(Messages.getString("EnigmaRunner.MENU_STOP"));
stopb.setIcon(LGM.getIconForKey("EnigmaPlugin.STOP"));
LGM.tool.add(new JToolBar.Separator(), 4);

Code: [Select]
public void compile(final int mode)
{
if (!assertReady()) return;

stop.setEnabled(true);
stopb.setEnabled(true);

etc..
Logged
Offline (Male) Goombert
Reply #17 Posted on: June 07, 2014, 02:58:34 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
What, let me check the hashes again, you can see here I've commented it out.
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaRunner.java#L410

Try manually downloading the plugin jar from here.
https://www.dropbox.com/s/bi2ws2jr53u9hsg/enigma.jar
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #18 Posted on: June 07, 2014, 03:08:25 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
What, let me check the hashes again, you can see here I've commented it out.
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaRunner.java#L410

Try manually downloading the plugin jar from here.
https://www.dropbox.com/s/bi2ws2jr53u9hsg/enigma.jar

Yes, i've downloaded also manually enigma.jar from the previous link. Try to open manually this jar and you will see that inside the enigmarunner.java doesn't have the updated version.
Logged
Offline (Male) Goombert
Reply #19 Posted on: June 07, 2014, 03:12:44 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
Wait, look the line should be commented add that adds stopb.
LGM.tool.add(new JToolBar.Separator(), 4);

The line directly after that, is it commented out or not?
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #20 Posted on: June 07, 2014, 03:24:25 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
Wait, look the line should be commented add that adds stopb.
LGM.tool.add(new JToolBar.Separator(), 4);

The line directly after that, is it commented out or not?

Ok the following line is commented, but i've still the error message. This afternoon i commented all lines concerning stopb, but this is easy to do :  if you do a search file with eclipse, in 30 seconds you can find and modify all lines. There must something like 10 lines to comment.

Edit :
If i remove line 169:

Code: [Select]
stopb.setVisible(false);
the error is also gone, but i find cleaner to comment all lines related to stopb.
Logged
Offline (Male) Goombert
Reply #21 Posted on: June 07, 2014, 03:32:43 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
Yes that's the bug because you can not traverse hidden buttons, also why it is only a bug in OpenJDK, again, it's fucking bullshit. But fine, I'll just comment all of it out.

Go ahead and redownload or python install.py
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages
« Last Edit: June 07, 2014, 03:35:31 PM by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #22 Posted on: June 08, 2014, 04:24:40 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
I did more tests and i found that that you have to comment also the following line (404 in EnigmaRunner.java):

Code: [Select]
LGM.tool.add(new JToolBar.Separator(), 4);
Anyway this separator is never displayed. This is really strange i know. In the end, i wonder if there is some gremlins in my PC !  :D I need to take another aspirin  :ohdear: ;)
By the way i am not using OpenJDK, but Java Oracle !
Logged
Offline (Male) Goombert
Reply #23 Posted on: June 08, 2014, 06:48:58 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
No that separator is definitely there, it is the separator on the toolbar directly after the create executable button. However it was being positioned improperly, I have now fixed that.

Try again by manually replacing the plugin jar or run python install.py
http://www.enigma-dev.org/docs/Wiki/Install:Extra_Packages
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #24 Posted on: June 08, 2014, 07:37:31 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
No that separator is definitely there, it is the separator on the toolbar directly after the create executable button. However it was being positioned improperly, I have now fixed that.

Try again by manually replacing the plugin jar or run python install.py
http://www.enigma-dev.org/docs/Wiki/Install:Extra_Packages

Thanks Robert. I am traveling right now and i will test it next week.
Logged
Offline (Unknown gender) egofree
Reply #25 Posted on: June 09, 2014, 02:49:18 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
The error is still here. :( In EnigmaRunner.java, the error comes now from :

Code: [Select]
LGM.tool.add(new JToolBar.Separator(), 8);
When we want to add a component in a toolbar at a given position, it seems to accept any component except a separator ! It doesn't trigger an error if you don't specify the position :

Code: [Select]
LGM.tool.addSeparator();
But of course, we don't want to add the separator at the end of the toolbar. I don't have for the moment a solution (Except the 'useLegacyMergeSort'  :D ).


Update :
Java : "Write once, run anywhere" Write once, test everywhere
:P
« Last Edit: June 09, 2014, 03:06:10 PM by egofree » Logged
Offline (Male) Goombert
Reply #26 Posted on: June 09, 2014, 04:04:33 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
lol egofree, I'm empathetic to your troubles, I don't know wth to do

I have contacted IsmAvatar
« Last Edit: June 09, 2014, 04:07:01 PM by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #27 Posted on: June 10, 2014, 04:16:46 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
For the moment i see two solutions :

1) Creation of the Build menu in LateralGM. If the plugin is successfully loaded, LateralGM loads the menu and the toolbar. Everytime a menu or button is clicked, the plugin functions are called.

2) Using the following line :

Code: [Select]
System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
I don't see any problem using the UseLEgacyMergeSort property. I think it is the easiest solution.

Edit:

3) I've seen the following code, in EnigmaRunner.java, in method subFrameAppeared :

Code: [Select]
status.add(new JLabel(" | ")); //$NON-NLS-1$
//visible divider       ^   since JSeparator isn't visible and takes up the whole thing...

What about using this instead of Separator ?

Edit2:

If i use :

Code: [Select]
LGM.tool.add(new JLabel("  "), 8);
Instead of

Code: [Select]
LGM.tool.add(new JToolBar.Separator(), 8);
Same error. So the error is not only happening with Separator.

Edit3:

If i add a JButton at position 8, the error happens also ! Too weird !. ???
« Last Edit: June 10, 2014, 04:58:20 AM by egofree » Logged
Offline (Unknown gender) egofree
Reply #28 Posted on: June 10, 2014, 11:09:15 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
By the way, i invite you to attend to my Ph.D. defense. It will happen in M.I.T on June 2034, and the title is :

" In Java, how to insert a component in a toolbar : a 20-year study ! "

 (Y)  :)
« Last Edit: June 10, 2014, 11:14:00 AM by egofree » Logged
Offline (Male) Goombert
Reply #29 Posted on: June 10, 2014, 11:57:43 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
:)

Maybe it is because the index at which items remains static and it's pissed about two having the same index? Ugh.

You could also try changing uhm setFocusTraversalPolicy of the toolbar.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: « 1 2 3 »
  Print