Allow switching between perspectives in the Integrated IDE #52

Merged
merged 7 commits into from Apr 24, 2017

Conversation

Projects
None yet
3 participants
@Mukarr
Collaborator

Mukarr commented Aug 14, 2016

A new dialog box was added that allows :

  1. To choose the perspective that you want to use, when Integrated IDE starts.
  2. To switch to other perspective while working with one.
@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 14, 2016

Member

It would be better to show the "Choose perspective" dialog in the center of the screen and always on top

Member

martinec commented Aug 14, 2016

It would be better to show the "Choose perspective" dialog in the center of the screen and always on top

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 14, 2016

Member

For the Classic perspective, It would be better to put the Perspective menu as a sub-menu of Window. This will be more consistent with the Window > Change Perspective menu of the Project-Oriented perspective.

Member

martinec commented Aug 14, 2016

For the Classic perspective, It would be better to put the Perspective menu as a sub-menu of Window. This will be more consistent with the Window > Change Perspective menu of the Project-Oriented perspective.

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 14, 2016

Member

In the following scenario, the change perspective feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Classic perspective
  • Select English as language
  • Perspective > Change Perspective
  • Select the Project-oriented perspective
  • Window > Change Perspective
  • Select the Classic perspective
  • Select English as language

What is the expected behavior?

The IDE switches from the Project-oriented to the Classic perspective

What do you see instead?

An exception is thrown:

java.lang.ClassCastException: Cannot cast org.gramlab.core.gramlab.frames.GramlabInternalFrameManager to org.gramlab.core.umlv.unitex.frames.UnitexInternalFrameManager
at java.lang.Class.cast(Class.java:3186)
at org.gramlab.core.gramlab.project.GramlabProject.getFrameManagerAs(GramlabProject.java:517)
at org.gramlab.core.umlv.unitex.frames.UnitexFrame$5.languageChanged(UnitexFrame.java:288)
at org.gramlab.core.umlv.unitex.config.Config.fireLanguageChanged(Config.java:1600)
at org.gramlab.core.umlv.unitex.config.Config.setCurrentLanguage(Config.java:1066)
at org.gramlab.core.umlv.unitex.config.Config.chooseInitialLanguage(Config.java:1340)
at org.gramlab.core.umlv.unitex.config.Config.initConfig(Config.java:259)
at org.gramlab.core.Main$4$1$1.run(Main.java:176)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

java.lang.ClassCastException: Cannot cast org.gramlab.core.gramlab.frames.GramlabInternalFrameManager to org.gramlab.core.umlv.unitex.frames.UnitexInternalFrameManager
at java.lang.Class.cast(Class.java:3186)
at org.gramlab.core.gramlab.project.GramlabProject.getFrameManagerAs(GramlabProject.java:517)
at org.gramlab.core.umlv.unitex.frames.UnitexFrame$5.languageChanged(UnitexFrame.java:288)
at org.gramlab.core.umlv.unitex.config.Config.fireLanguageChanged(Config.java:1600)
at org.gramlab.core.umlv.unitex.config.Config.setCurrentLanguage(Config.java:1066)
at org.gramlab.core.umlv.unitex.config.Config.chooseInitialLanguage(Config.java:1340)
at org.gramlab.core.umlv.unitex.config.Config.initConfig(Config.java:259)
at org.gramlab.core.Main$4$1$1.run(Main.java:176)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Member

martinec commented Aug 14, 2016

In the following scenario, the change perspective feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Classic perspective
  • Select English as language
  • Perspective > Change Perspective
  • Select the Project-oriented perspective
  • Window > Change Perspective
  • Select the Classic perspective
  • Select English as language

What is the expected behavior?

The IDE switches from the Project-oriented to the Classic perspective

What do you see instead?

An exception is thrown:

java.lang.ClassCastException: Cannot cast org.gramlab.core.gramlab.frames.GramlabInternalFrameManager to org.gramlab.core.umlv.unitex.frames.UnitexInternalFrameManager
at java.lang.Class.cast(Class.java:3186)
at org.gramlab.core.gramlab.project.GramlabProject.getFrameManagerAs(GramlabProject.java:517)
at org.gramlab.core.umlv.unitex.frames.UnitexFrame$5.languageChanged(UnitexFrame.java:288)
at org.gramlab.core.umlv.unitex.config.Config.fireLanguageChanged(Config.java:1600)
at org.gramlab.core.umlv.unitex.config.Config.setCurrentLanguage(Config.java:1066)
at org.gramlab.core.umlv.unitex.config.Config.chooseInitialLanguage(Config.java:1340)
at org.gramlab.core.umlv.unitex.config.Config.initConfig(Config.java:259)
at org.gramlab.core.Main$4$1$1.run(Main.java:176)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

java.lang.ClassCastException: Cannot cast org.gramlab.core.gramlab.frames.GramlabInternalFrameManager to org.gramlab.core.umlv.unitex.frames.UnitexInternalFrameManager
at java.lang.Class.cast(Class.java:3186)
at org.gramlab.core.gramlab.project.GramlabProject.getFrameManagerAs(GramlabProject.java:517)
at org.gramlab.core.umlv.unitex.frames.UnitexFrame$5.languageChanged(UnitexFrame.java:288)
at org.gramlab.core.umlv.unitex.config.Config.fireLanguageChanged(Config.java:1600)
at org.gramlab.core.umlv.unitex.config.Config.setCurrentLanguage(Config.java:1066)
at org.gramlab.core.umlv.unitex.config.Config.chooseInitialLanguage(Config.java:1340)
at org.gramlab.core.umlv.unitex.config.Config.initConfig(Config.java:259)
at org.gramlab.core.Main$4$1$1.run(Main.java:176)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Mukarr added some commits Aug 13, 2016

Allow switching between perspectives(Classic and Project-oriented) in…
… the Integrated IDE

A new dialog box was added that allows :
1. To choose the perspective that you want to use, when Integrated IDE starts.
2. To switch to other perspective while working with one.
The dialog can be improved by adding a 'Remember me' checkbox, to avoid asking to choose perspective again and again.
@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 16, 2016

Member

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Project-oriented perspective
  • Click on New project > Create a project from a Unitex user directory
  • Set Name: Test, Language: English (en), Directory to import: /foo/bar/Unitex-GramLab-3.1/English/
  • Click on Test > src > Graphs > Preprocessing > Sentence > Sentence.grf
  • Select the Open a sup-graph icon from the graph toolbox.
  • Click on the Interjection box

What is the expected behavior?

The IDE open the graph Interjection

What do you see instead?

An exception is thrown:

java.lang.NullPointerException
at org.gramlab.core.umlv.unitex.graphrendering.GraphicalZone$MyMouseListener.customMouseClicked(GraphicalZone.java:1395)
at org.gramlab.core.umlv.unitex.graphrendering.GraphicalZone$MyMouseListener.mouseReleased(GraphicalZone.java:1542)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Member

martinec commented Aug 16, 2016

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Project-oriented perspective
  • Click on New project > Create a project from a Unitex user directory
  • Set Name: Test, Language: English (en), Directory to import: /foo/bar/Unitex-GramLab-3.1/English/
  • Click on Test > src > Graphs > Preprocessing > Sentence > Sentence.grf
  • Select the Open a sup-graph icon from the graph toolbox.
  • Click on the Interjection box

What is the expected behavior?

The IDE open the graph Interjection

What do you see instead?

An exception is thrown:

java.lang.NullPointerException
at org.gramlab.core.umlv.unitex.graphrendering.GraphicalZone$MyMouseListener.customMouseClicked(GraphicalZone.java:1395)
at org.gramlab.core.umlv.unitex.graphrendering.GraphicalZone$MyMouseListener.mouseReleased(GraphicalZone.java:1542)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Mukarr added some commits Aug 17, 2016

Revert "[fix] Separate project-managers for classic and project-orien…
…ted perspectives"

This reverts commit db8b04e. The approach failed.
[fix] Save instances of project-managers of Classic and Project-orien…
…ted perspectives

This commit would save instance of project-manager of particular perspective. This would enable re-switching to a perspective after switching to the other perspective.
+ center.add(projectOriented);
+ bg.add(classic);
+ bg.add(projectOriented);
+ final JLabel error = new JLabel("You are already using "+currPerspective+" Perspective.");

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

It would be better to avoid this kind of feedback. What about to disable by default the radio button corresponding to the current active perspective?

@martinec

martinec Aug 17, 2016

Member

It would be better to avoid this kind of feedback. What about to disable by default the radio button corresponding to the current active perspective?

+ JPanel center=new JPanel(new GridLayout(7,7));
+ center.add(new JLabel(""));
+ final JRadioButton classic=new JRadioButton("Classic",true);
+ final JRadioButton projectOriented=new JRadioButton("Project-Oriented",false);

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

Project-oriented

@martinec

martinec Aug 17, 2016

Member

Project-oriented

@@ -1411,7 +1414,7 @@ public void actionPerformed(ActionEvent e) {
menu.add(open);
return menu;
}
-
+
JMenu buildWindowsMenu() {
final JMenu windows = new JMenu("Windows");

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

Window

@martinec

martinec Aug 17, 2016

Member

Window

This comment has been minimized.

@Mukarr

Mukarr Aug 17, 2016

Collaborator

It was Windows earlier. Should I change it to Window ?

@Mukarr

Mukarr Aug 17, 2016

Collaborator

It was Windows earlier. Should I change it to Window ?

-
+
+ private JMenu createWindowMenu() {
+ JMenu m = new JMenu("Window");

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

Use Window > Perspective >Change Perspective

@martinec

martinec Aug 17, 2016

Member

Use Window > Perspective >Change Perspective

@@ -1497,6 +1505,7 @@ private JMenuBar createMenuBar() {
JMenuBar bar = new JMenuBar();
bar.add(createWorkspaceMenu());
bar.add(createProjectMenu());
+ bar.add(createWindowMenu());

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

Put the Window menu just before Help

@martinec

martinec Aug 17, 2016

Member

Put the Window menu just before Help

+ }
+
+ public static GramlabProjectManager getGramlabProjectManager () {
+ return projectoriented;

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

projectOriented

@martinec

martinec Aug 17, 2016

Member

projectOriented

+ }
+
+ public static void setGramlabProjectManager (ProjectManager manager) {
+ GlobalProjectManager.projectoriented = (GramlabProjectManager) manager;

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

projectOriented

@martinec

martinec Aug 17, 2016

Member

projectOriented

private static ProjectManager projectManager;
-
+ private static ProjectManager classic;
+ private static GramlabProjectManager projectoriented;

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

projectOriented

@martinec

martinec Aug 17, 2016

Member

projectOriented

System.err
- .println("Your version of Java does not contain all the classes required by GramLab.\nProgram Terminated");
+ .println("Your version of Java does not contain all the classes required by Unitex.\nProgram Terminated");

This comment has been minimized.

@martinec

martinec Aug 17, 2016

Member

by GramLab

@martinec

martinec Aug 17, 2016

Member

by GramLab

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 17, 2016

Member

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar (The splash screen is displayed)
  • Select the Classic perspective (The splash screen is displayed again)

What is the expected behavior?

The splash screen is displayed once.

What do you see instead?

The splash screen is displayed twice.

Member

martinec commented Aug 17, 2016

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar (The splash screen is displayed)
  • Select the Classic perspective (The splash screen is displayed again)

What is the expected behavior?

The splash screen is displayed once.

What do you see instead?

The splash screen is displayed twice.

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 17, 2016

Member

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Classic perspective
  • Select English as language
  • Click on FSGraph > Open > Preprocessing > Sentence > Sentence.grf
  • Click on Window > Perspective > Change Perspective
  • Select the Project-oriented perspective
  • Click on Window > Change Perspective
  • Select the Classic perspective
  • Select the Graphs that call this one icon from the Sentence.grf graph toolbox

What is the expected behavior?

The panel containing the list of graphs that call Sentence.grfis show

What do you see instead?

An exception is thrown:

java.lang.ClassCastException: Cannot cast org.gramlab.core.umlv.unitex.project.manager.UnitexProjectManager to org.gramlab.core.gramlab.project.GramlabProjectManager
at java.lang.Class.cast(Class.java:3369)
at org.gramlab.core.umlv.unitex.common.project.manager.GlobalProjectManager.getAs(GlobalProjectManager.java:64)
at org.gramlab.core.gramlab.project.config.ProjectPreferences.getCurrentLanguageDir(ProjectPreferences.java:297)
at org.gramlab.core.umlv.unitex.frames.GraphFrame.showGraphDependencies(GraphFrame.java:947)
at org.gramlab.core.umlv.unitex.frames.GraphFrame$31.actionPerformed(GraphFrame.java:777)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Member

martinec commented Aug 17, 2016

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Classic perspective
  • Select English as language
  • Click on FSGraph > Open > Preprocessing > Sentence > Sentence.grf
  • Click on Window > Perspective > Change Perspective
  • Select the Project-oriented perspective
  • Click on Window > Change Perspective
  • Select the Classic perspective
  • Select the Graphs that call this one icon from the Sentence.grf graph toolbox

What is the expected behavior?

The panel containing the list of graphs that call Sentence.grfis show

What do you see instead?

An exception is thrown:

java.lang.ClassCastException: Cannot cast org.gramlab.core.umlv.unitex.project.manager.UnitexProjectManager to org.gramlab.core.gramlab.project.GramlabProjectManager
at java.lang.Class.cast(Class.java:3369)
at org.gramlab.core.umlv.unitex.common.project.manager.GlobalProjectManager.getAs(GlobalProjectManager.java:64)
at org.gramlab.core.gramlab.project.config.ProjectPreferences.getCurrentLanguageDir(ProjectPreferences.java:297)
at org.gramlab.core.umlv.unitex.frames.GraphFrame.showGraphDependencies(GraphFrame.java:947)
at org.gramlab.core.umlv.unitex.frames.GraphFrame$31.actionPerformed(GraphFrame.java:777)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@Mukarr

This comment has been minimized.

Show comment
Hide comment
@Mukarr

Mukarr Aug 20, 2016

Collaborator

@aleksandrachasch The above mentioned scenario always throws an exception, even in the current version of gramlab-ide. You can also check with master branch.
Since you are trying to open a file that is not present in the current project's workspace, it throws an exception.
I think a separate issue should be opened for this, as this is not pertaining to this PR.

Collaborator

Mukarr commented Aug 20, 2016

@aleksandrachasch The above mentioned scenario always throws an exception, even in the current version of gramlab-ide. You can also check with master branch.
Since you are trying to open a file that is not present in the current project's workspace, it throws an exception.
I think a separate issue should be opened for this, as this is not pertaining to this PR.

@aleksandrachasch

This comment has been minimized.

Show comment
Hide comment
@aleksandrachasch

aleksandrachasch Aug 20, 2016

Collaborator

To my mind, it would be more convenient if the buttons cancel and OK in Select perspective frame are switched, as usually the OK button is situated on the left, while Cancel is situated on the right.

Collaborator

aleksandrachasch commented Aug 20, 2016

To my mind, it would be more convenient if the buttons cancel and OK in Select perspective frame are switched, as usually the OK button is situated on the left, while Cancel is situated on the right.

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Aug 22, 2016

Member

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Project-oriented perspective
  • Click on New project > Create a project from a Unitex user directory
  • Set Name: Test, Language: English (en), Directory to import: /foo/bar/Unitex-GramLab-3.1/English/
  • Click on Test > src > Graphs > Preprocessing > Sentence > Sentence.grf
  • Select the Remove a box icon from the graph toolbox.

What is the expected behavior?

The cursor is set to the icon of the Remove a box tool

gramlab-graph-toolbox

What do you see instead?

The cursor is not set to the icon of the Remove a box tool

gramlab-graph-toolbox_no_icon

Member

martinec commented Aug 22, 2016

In the following scenario, the feature does not work as expected:

What steps will reproduce the problem?

  • Launch GramLab.jar
  • Select the Project-oriented perspective
  • Click on New project > Create a project from a Unitex user directory
  • Set Name: Test, Language: English (en), Directory to import: /foo/bar/Unitex-GramLab-3.1/English/
  • Click on Test > src > Graphs > Preprocessing > Sentence > Sentence.grf
  • Select the Remove a box icon from the graph toolbox.

What is the expected behavior?

The cursor is set to the icon of the Remove a box tool

gramlab-graph-toolbox

What do you see instead?

The cursor is not set to the icon of the Remove a box tool

gramlab-graph-toolbox_no_icon

@martinec martinec changed the title from Allow switching between perspectives(Classic and Project-oriented) in the Integrated IDE to Allow switching between perspectives in the Integrated IDE Feb 20, 2017

@martinec

This comment has been minimized.

Show comment
Hide comment
@martinec

martinec Apr 24, 2017

Member

LGTM. I’m merging this pull request but there is still a minor issue to fix concerning mouse icons. @Mukarr would you mind to take a look? Thank you

Member

martinec commented Apr 24, 2017

LGTM. I’m merging this pull request but there is still a minor issue to fix concerning mouse icons. @Mukarr would you mind to take a look? Thank you

@martinec martinec merged commit cafc576 into UnitexGramLab:feature/plugins Apr 24, 2017

2 checks passed

code-review/pullapprove Approved by aleksandrachasch
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment