Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Eclipse 3.3.0 GEF fails with IndexOutOfBoundsException - works on Eclipse 3.2.1
Eclipse 3.3.0 GEF fails with IndexOutOfBoundsException - works on Eclipse 3.2.1 [message #237460] Wed, 01 August 2007 14:52 Go to next message
No real name is currently offline No real name
Messages: 2
Registered: July 2009
Junior Member
I have a GEF based editor running in production status
under Eclipse 3.2.1 Build id: M20060921-0945 and GEF
version 3.2.1.v20060921. In this Eclipse environment
my plug-in behaves "as expected."

Platform environment is
Windows XP Professional Service Pack 2 and
Sun Microsystems, Inc. JRE 1.5.0_12

I prepared a duplicate copy of the Eclipse 3.2.1
project to begin movement of my plug-in to
Eclipse Europa 3.3.0 environment
Build id: I20070625-1500 and GEF
version 3.2.100.v20070620

I have made ZERO code changes to my
plug-in's Java source. I removed two
Bundle-Localization header
from plug-in's MANIFEST.MF files.

When I attempt to open the editor window in
the Europa environment, I receive the following
error trace:


"Error opening the editor"

java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
at java.util.ArrayList.add(Unknown Source)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.primAddS ourceConnection(AbstractGraphicalEditPart.java:518)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addSourc eConnection(AbstractGraphicalEditPart.java:239)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshS ourceConnections(AbstractGraphicalEditPart.java:612)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:565)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:235)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:198)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:727)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:677)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:564)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:235)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:198)
at
org.eclipse.gef.editparts.SimpleRootEditPart.setContents(Sim pleRootEditPart.java:101)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:601)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:610)
at
com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor.initializeGraphicalViewer(PrimaryEditor.java:286)
at
org.eclipse.gef.ui.parts.GraphicalEditor.createGraphicalView er(GraphicalEditor.java:153)
at
org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(G raphicalEditor.java:163)
at
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.cr eatePartControl(GraphicalEditorWithFlyoutPalette.java:77)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:400)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 04)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:774)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:673)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:634)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2719)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2633)
at
org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:2625)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2577)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2572)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2556)
at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu. java:340)
at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.ja va:328)
at
org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMe nu.java:190)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

The location referred to in the trace
at
com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor.initializeGraphicalViewer(PrimaryEditor.java:286)
is "viewer.setContents(getModel());" in the following method

/**
* Set up the editor's initial content (after creation).
*
* overrides GEF part method
* @see
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette#in itializeGraphicalViewer()
*/
protected void initializeGraphicalViewer() {

super.initializeGraphicalViewer();
GraphicalViewer viewer = getGraphicalViewer();
viewer.setContents(getModel()); // line #286
viewer.addDropTargetListener(createTransferDropTargetListene r());

getEditorSite()
.getActionBars()
.getStatusLineManager()
.setMessage("Capirè Work Bench Graphical Editor");

IWorkbenchPage page = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();

if (page == null) return;
try {
page
.showView(" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew ");
} catch (PartInitException e) {
return;
} catch (Exception e1) {
page.getActivePart();
return;
}

}

Since this is working "as expected" in an earlier Eclipse/GEF environment,
I believe I have an "invalid implementation" that has remained hidden for
more than two years that I cannot identify today.

Any assistance would be gratefully appreciated.

Here is the unchanged plugin.xml file


<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<plugin>

<!-- First attempt to merge CWB 1.3 definitions with CGE -->
<!-- oXygen and Quantum interfaces omitted -->

<extension point="org.eclipse.ui.editors">
<editor name="CapireGraphicalEditor"
extensions="cpxl, xls"
icon="icons/knot_24.gif"
default="true"

class=" com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor "

contributorClass=" com.bankofamerica.capire.workbench.graphicaleditor.MainActio nBarContributor "

id=" com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor " />

<!-- Test scenario properties editor from CWB 1.3.x -->
<editor name="CapireTestPropertiesEditor"
extensions="txl"
icon="icons/banana-icon.jpg"
default="true"

class=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito r "

contributorClass=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito rContributor "

id=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito r " />

</extension>

<!-- The CGE versions of the two preference related extensions -->
<!-- *** SHOULD *** be sufficient for the ITF. -->

<extension point="org.eclipse.ui.preferencePages">
<page name="Capire"

class=" com.bankofamerica.capire.workbench.preferences.PreferencePag e "

id=" com.bankofamerica.capire.workbench.preferences.PreferencePag e "/>
</extension>

<extension point="org.eclipse.core.runtime.preferences">
<initializer
class=" com.bankofamerica.capire.workbench.preferences.PreferenceIni tializer "/>
</extension>


<extension point="org.eclipse.ui.views">

<!-- CWB 1.3.x views -->


<category name="Capire" id="capire"/>

<view
name="Test Results"
icon="icons/little_c.gif"
category="capire"
class="com.bankofamerica.capire.workbench.views.TestResultView "

id="com.bankofamerica.capire.workbench.views.TestResultView "/>

<view
name="Infix Converter"
icon="icons/little_c.gif"
category="capire"
class="com.bankofamerica.capire.workbench.views.InfixView"
id="com.bankofamerica.capire.workbench.views.InfixView"/>

<view
name="Postfix Converter"
icon="icons/little_c.gif"
category="capire"
class="com.bankofamerica.capire.workbench.views.PostfixView "
id="com.bankofamerica.capire.workbench.views.PostfixView"/ >

<view
name="Test Facility Controller"
icon="icons/little_c.gif"
category="capire"
class="com.bankofamerica.capire.workbench.views.JettyView"
id="com.bankofamerica.capire.workbench.views.JettyView"/>


<!-- CGE specific view additions -->

<view
name="Utility Display"
icon="icons/little_c.gif"
category="capire"

class=" com.bankofamerica.capire.workbench.graphicaleditor.UtilityDi splayView "

id=" com.bankofamerica.capire.workbench.graphicaleditor.UtilityDi splayView "/>

<view
name="Nodebook"
icon="icons/little_c.gif"
category="capire"

class=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "

id=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "/>
</extension>

<!-- Nodebook operation group -->
<extension
point="org.eclipse.ui.viewActions">
<viewContribution

targetID=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "

id=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew.pushbutton ">
<!-- Reset button -->
<action
label="Reset"
icon="icons/reset16.gif"
tooltip="Ignore changes"

class=" com.bankofamerica.capire.workbench.graphicaleditor.actions.N odeBookActionDelegate "
toolbarPath="nodebook_group"
enablesFor="*"
id="nodebook.toolbar.reset">
</action>
<!-- Apply button -->
<action
label="Apply"
icon="icons/apply16.gif"
tooltip="Apply changes"

class=" com.bankofamerica.capire.workbench.graphicaleditor.actions.N odeBookActionDelegate "
toolbarPath="nodebook_group"
enablesFor="*"
id="nodebook.toolbar.apply">

</action>
</viewContribution>
</extension>

<!-- CWB 1.3.x pop-up menu definitions -->


<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="com.bankofamerica.capire.filemenu"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.cpxl">
<menu

id=" org.eclipse.ui.articles.action.contribution.navigator.capire "
label="Capire"
path="additions">
<separator name="group1"/>
</menu>

<action

id=" org.eclipse.ui.articles.action.contribution.navigator.valida tor "
label="Validator"
icon="icons/green_check.gif"

helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.valida tor "

menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group1 "

class=" com.bankofamerica.capire.workbench.actions.CapireValidatorAc tion "
enablesFor="1"/>

<action

id=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher "
label="Test Launcher"
icon="icons/gold_star.gif"

helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher "

menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group1 "

class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
enablesFor="1"
state="true"
style="push"/>
</objectContribution>

<objectContribution
id="com.bankofamerica.capire.testmenu"
nameFilter="*.txl"
objectClass="org.eclipse.core.resources.IFile">

<menu

id=" org.eclipse.ui.articles.action.contribution.navigator.capire .test "
label="Capire">
<separator name="group2"/>
</menu>

<action

id=" org.eclipse.ui.articles.action.contribution.navigator.testla uncher "
label="Test Launcher"
icon="icons/gold_star.gif"

helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.testla uncher "

menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire .test/group2 "

class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
enablesFor="1"
state="true"
style="push"/>

</objectContribution>

<!-- Invoke Validator and Test Launcher for XLS files -->

<objectContribution
id="com.bankofamerica.capire.filemenu.xls"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.xls">
<menu

id=" org.eclipse.ui.articles.action.contribution.navigator.capire "
label="Capire"
path="additions">
<separator name="group3"/>
</menu>

<action

id=" org.eclipse.ui.articles.action.contribution.navigator.valida tor.xls "
label="Validator"
icon="icons/green_check.gif"

helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.valida tor.xls "

menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group3 "

class=" com.bankofamerica.capire.workbench.actions.CapireValidatorAc tion "
enablesFor="1"/>

<action

id=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher.xls "
label="Test Launcher"
icon="icons/gold_star.gif"

helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher.xls "

menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group3 "

class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
enablesFor="1"
state="true"
style="push"/>
</objectContribution>

</extension>

<extension point="org.eclipse.ui.newWizards">

<category id="capire.wizards" name="Capire"/>

<wizard
name="New Capire Project"
icon="icons/little_c.gif"
project="true"
category="capire.wizards"

finalPerspective=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "

class="com.bankofamerica.capire.workbench.wizards.NewProjectWizard "
id="com.bankofamerica.capire.workbench.wizards.NewProjectWizard ">

<description>Create a skeleton Capire project</description>
</wizard>
</extension>


<extension point="org.eclipse.ui.perspectives">
<perspective
name="Capire"
fixed="false"
icon="icons/little_c.gif"

class=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "

id=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "/>

</extension>



</plugin>


Here is the Eclipse 3.2.1 working
plug-in manifest file

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CapireWorkBench
Bundle-SymbolicName: CapireWorkBench; singleton:=true
Bundle-Version: 1.5.3
Bundle-Activator:
com.bankofamerica.capire.workbench.graphicaleditor.BundleAct ivatorPluginModule
Bundle-Vendor: Capire Team
Bundle-Localization: plugin
Require-Bundle: org.eclipse.gef,
org.eclipse.ui,
org.eclipse.compare,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui.editors,
org.eclipse.ui.views,
org.eclipse.ui.workbench,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
org.eclipse.jface,
org.eclipse.jface.text
Eclipse-LazyStart: true
Export-Package: com.bankofamerica.capire.workbench.graphicaleditor,
com.bankofamerica.capire.workbench.graphicaleditor.actions,
com.bankofamerica.capire.workbench.graphicaleditor.model,
com.bankofamerica.capire.workbench.graphicaleditor.model.com mands,
com.bankofamerica.capire.workbench.graphicaleditor.parts,
com.bankofamerica.capire.workbench.actions,
com.bankofamerica.capire.workbench.views
Bundle-ClassPath: CapireWorkBench.jar,
jacob.jar,
castor-1.0M2-xml.jar,
commons-logging.jar,
xerces-J_1.4.0.jar,
log4j-1.2.13.jar,
servlet-api-2.5.jar,
jetty.jar,
jetty-util.jar,
commons-validator-1.3.0.jar,
ext/user-javaapi.jar,
ext/commons-logging.jar,
ext/commons-el.jar,
ext/commons-logging-api.jar,
ext/jasper-runtime.jar,
ext/jasper-compiler.jar,
jdbc/db2jcc_license_cisuz.jar,
jdbc/db2jcc_zos.jar,
jdbc/ojdbc14.jar,
jdbc/terajdbc4.jar,
jdbc/mysql-connector-java-3.1.12-bin.jar
Re: Eclipse 3.3.0 GEF fails with IndexOutOfBoundsException - works on Eclipse 3.2.1 [message #238064 is a reply to message #237460] Wed, 22 August 2007 20:16 Go to previous messageGo to next message
Brian Jakubik is currently offline Brian Jakubik
Messages: 140
Registered: July 2009
Senior Member
I had a very similar issue when I moved to 3.3 from 3.1, worked fine on
3.1, but on 3.3 it was hit and miss depending on what I was editing.

It ended up being in a subclass of AbstractGraphicalEditPart in
getModelTargetConnections or getModelSourceConnections, I had duplicates
being added to the list (bug on our part, but not surfaced until 3.3) so
you might look there if you have not resolved this yet..

The stack trace is almost identical to what I saw, hope that helps...

Brian Jakubik

James Krell wrote:
> I have a GEF based editor running in production status
> under Eclipse 3.2.1 Build id: M20060921-0945 and GEF
> version 3.2.1.v20060921. In this Eclipse environment
> my plug-in behaves "as expected."
>
> Platform environment is
> Windows XP Professional Service Pack 2 and
> Sun Microsystems, Inc. JRE 1.5.0_12
>
> I prepared a duplicate copy of the Eclipse 3.2.1
> project to begin movement of my plug-in to
> Eclipse Europa 3.3.0 environment
> Build id: I20070625-1500 and GEF
> version 3.2.100.v20070620
>
> I have made ZERO code changes to my
> plug-in's Java source. I removed two
> Bundle-Localization header from plug-in's MANIFEST.MF files.
>
> When I attempt to open the editor window in
> the Europa environment, I receive the following
> error trace:
>
>
> "Error opening the editor"
>
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
> at java.util.ArrayList.add(Unknown Source)
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.primAddS ourceConnection(AbstractGraphicalEditPart.java:518)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.addSourc eConnection(AbstractGraphicalEditPart.java:239)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshS ourceConnections(AbstractGraphicalEditPart.java:612)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:565)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:235)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:198)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:727)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:677)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:564)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:235)
>
> at
> org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
>
> at
> org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:198)
>
> at
> org.eclipse.gef.editparts.SimpleRootEditPart.setContents(Sim pleRootEditPart.java:101)
>
> at
> org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:601)
>
> at
> org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents( AbstractEditPartViewer.java:610)
>
> at
> com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor.initializeGraphicalViewer(PrimaryEditor.java:286)
>
> at
> org.eclipse.gef.ui.parts.GraphicalEditor.createGraphicalView er(GraphicalEditor.java:153)
>
> at
> org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(G raphicalEditor.java:163)
>
> at
> org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.cr eatePartControl(GraphicalEditorWithFlyoutPalette.java:77)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:400)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 04)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:774)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:673)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:634)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2719)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2633)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:2625)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2577)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2572)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2556)
> at
> org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu. java:340)
> at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.ja va:328)
> at
> org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMe nu.java:190)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
>
> The location referred to in the trace
> at
> com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor.initializeGraphicalViewer(PrimaryEditor.java:286)
>
> is "viewer.setContents(getModel());" in the following method
>
> /**
> * Set up the editor's initial content (after creation).
> * * overrides GEF part method
> * @see
> org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette#in itializeGraphicalViewer()
>
> */
> protected void initializeGraphicalViewer() {
>
> super.initializeGraphicalViewer();
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setContents(getModel()); // line #286
> viewer.addDropTargetListener(createTransferDropTargetListene r());
>
> getEditorSite()
> .getActionBars()
> .getStatusLineManager()
> .setMessage("Capirè Work Bench Graphical Editor");
>
> IWorkbenchPage page = PlatformUI.getWorkbench()
> .getActiveWorkbenchWindow().getActivePage();
>
> if (page == null) return;
> try {
> page
>
> .showView(" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew ");
>
> } catch (PartInitException e) {
> return;
> } catch (Exception e1) {
> page.getActivePart();
> return;
> }
>
> }
>
> Since this is working "as expected" in an earlier Eclipse/GEF environment,
> I believe I have an "invalid implementation" that has remained hidden for
> more than two years that I cannot identify today.
>
> Any assistance would be gratefully appreciated.
>
> Here is the unchanged plugin.xml file
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.0"?>
>
> <plugin>
>
> <!-- First attempt to merge CWB 1.3 definitions with CGE -->
> <!-- oXygen and Quantum interfaces omitted -->
>
> <extension point="org.eclipse.ui.editors">
> <editor name="CapireGraphicalEditor"
> extensions="cpxl, xls"
> icon="icons/knot_24.gif"
> default="true"
>
> class=" com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor "
>
> contributorClass=" com.bankofamerica.capire.workbench.graphicaleditor.MainActio nBarContributor "
>
>
> id=" com.bankofamerica.capire.workbench.graphicaleditor.PrimaryEd itor " />
>
> <!-- Test scenario properties editor from CWB 1.3.x -->
> <editor name="CapireTestPropertiesEditor"
> extensions="txl"
> icon="icons/banana-icon.jpg"
> default="true"
>
> class=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito r "
>
> contributorClass=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito rContributor "
>
>
> id=" com.bankofamerica.capire.workbench.editors.TestPropertyEdito r " />
>
> </extension>
>
> <!-- The CGE versions of the two preference related extensions -->
> <!-- *** SHOULD *** be sufficient for the ITF. -->
>
> <extension point="org.eclipse.ui.preferencePages">
> <page name="Capire"
>
> class=" com.bankofamerica.capire.workbench.preferences.PreferencePag e "
>
> id=" com.bankofamerica.capire.workbench.preferences.PreferencePag e "/>
> </extension>
> <extension point="org.eclipse.core.runtime.preferences">
> <initializer
> class=" com.bankofamerica.capire.workbench.preferences.PreferenceIni tializer "/>
>
> </extension>
>
> <extension point="org.eclipse.ui.views">
>
> <!-- CWB 1.3.x views -->
>
>
> <category name="Capire" id="capire"/>
>
> <view
> name="Test Results"
> icon="icons/little_c.gif" category="capire"
> class="com.bankofamerica.capire.workbench.views.TestResultView "
>
> id="com.bankofamerica.capire.workbench.views.TestResultView "/>
>
> <view
> name="Infix Converter"
> icon="icons/little_c.gif"
> category="capire"
> class="com.bankofamerica.capire.workbench.views.InfixView"
> id="com.bankofamerica.capire.workbench.views.InfixView"/>
>
> <view
> name="Postfix Converter"
> icon="icons/little_c.gif"
> category="capire"
> class="com.bankofamerica.capire.workbench.views.PostfixView "
> id="com.bankofamerica.capire.workbench.views.PostfixView"/ >
>
> <view
> name="Test Facility Controller"
> icon="icons/little_c.gif"
> category="capire"
> class="com.bankofamerica.capire.workbench.views.JettyView"
> id="com.bankofamerica.capire.workbench.views.JettyView"/>
>
>
> <!-- CGE specific view additions -->
>
> <view
> name="Utility Display"
> icon="icons/little_c.gif"
> category="capire"
>
> class=" com.bankofamerica.capire.workbench.graphicaleditor.UtilityDi splayView "
>
>
> id=" com.bankofamerica.capire.workbench.graphicaleditor.UtilityDi splayView "/>
>
> <view
> name="Nodebook"
> icon="icons/little_c.gif"
> category="capire"
>
> class=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "
>
> id=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "/>
> </extension>
> <!-- Nodebook operation group -->
> <extension
> point="org.eclipse.ui.viewActions">
> <viewContribution
>
> targetID=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew "
>
> id=" com.bankofamerica.capire.workbench.graphicaleditor.NodebookV iew.pushbutton ">
>
> <!-- Reset button -->
> <action
> label="Reset"
> icon="icons/reset16.gif"
> tooltip="Ignore changes"
>
> class=" com.bankofamerica.capire.workbench.graphicaleditor.actions.N odeBookActionDelegate "
>
> toolbarPath="nodebook_group"
> enablesFor="*"
> id="nodebook.toolbar.reset">
> </action>
> <!-- Apply button -->
> <action
> label="Apply"
> icon="icons/apply16.gif"
> tooltip="Apply changes"
>
> class=" com.bankofamerica.capire.workbench.graphicaleditor.actions.N odeBookActionDelegate "
>
> toolbarPath="nodebook_group"
> enablesFor="*"
> id="nodebook.toolbar.apply">
> </action>
> </viewContribution>
> </extension>
>
> <!-- CWB 1.3.x pop-up menu definitions -->
>
>
> <extension point="org.eclipse.ui.popupMenus">
> <objectContribution
> id="com.bankofamerica.capire.filemenu"
> objectClass="org.eclipse.core.resources.IFile"
> nameFilter="*.cpxl">
> <menu
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.capire "
> label="Capire"
> path="additions">
> <separator name="group1"/>
> </menu>
>
> <action
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.valida tor "
> label="Validator"
> icon="icons/green_check.gif"
>
> helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.valida tor "
>
>
> menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group1 "
>
>
> class=" com.bankofamerica.capire.workbench.actions.CapireValidatorAc tion "
> enablesFor="1"/>
>
> <action
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher "
>
> label="Test Launcher"
> icon="icons/gold_star.gif"
>
> helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher "
>
>
> menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group1 "
>
>
> class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
> enablesFor="1"
> state="true"
> style="push"/>
> </objectContribution>
>
> <objectContribution
> id="com.bankofamerica.capire.testmenu"
> nameFilter="*.txl"
> objectClass="org.eclipse.core.resources.IFile">
>
> <menu
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.capire .test "
> label="Capire">
> <separator name="group2"/>
> </menu>
>
> <action
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.testla uncher "
> label="Test Launcher"
> icon="icons/gold_star.gif"
>
> helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.testla uncher "
>
>
> menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire .test/group2 "
>
>
> class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
> enablesFor="1"
> state="true"
> style="push"/>
>
> </objectContribution>
>
> <!-- Invoke Validator and Test Launcher for XLS files -->
>
> <objectContribution
> id="com.bankofamerica.capire.filemenu.xls"
> objectClass="org.eclipse.core.resources.IFile"
> nameFilter="*.xls">
> <menu
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.capire "
> label="Capire"
> path="additions">
> <separator name="group3"/>
> </menu>
> <action
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.valida tor.xls "
> label="Validator"
> icon="icons/green_check.gif"
>
> helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.valida tor.xls "
>
>
> menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group3 "
>
>
> class=" com.bankofamerica.capire.workbench.actions.CapireValidatorAc tion "
> enablesFor="1"/>
> <action
>
> id=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher.xls "
>
> label="Test Launcher"
> icon="icons/gold_star.gif"
>
> helpContextId=" org.eclipse.ui.articles.action.contribution.navigator.capire testlauncher.xls "
>
>
> menubarPath=" org.eclipse.ui.articles.action.contribution.navigator.capire /group3 "
>
>
> class="com.bankofamerica.capire.workbench.actions.CapireTestAction "
> enablesFor="1"
> state="true"
> style="push"/>
> </objectContribution>
>
> </extension>
>
> <extension point="org.eclipse.ui.newWizards">
> <category id="capire.wizards" name="Capire"/>
> <wizard
> name="New Capire Project"
> icon="icons/little_c.gif"
> project="true"
> category="capire.wizards"
>
> finalPerspective=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "
>
> class="com.bankofamerica.capire.workbench.wizards.NewProjectWizard "
> id="com.bankofamerica.capire.workbench.wizards.NewProjectWizard ">
> <description>Create a skeleton Capire project</description>
> </wizard>
> </extension>
>
> <extension point="org.eclipse.ui.perspectives">
> <perspective
> name="Capire"
> fixed="false"
> icon="icons/little_c.gif"
>
> class=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "
>
>
> id=" com.bankofamerica.capire.workbench.perspectives.CapirePerspe ctiveFactory "/>
>
> </extension>
> </plugin>
>
>
> Here is the Eclipse 3.2.1 working
> plug-in manifest file
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: CapireWorkBench
> Bundle-SymbolicName: CapireWorkBench; singleton:=true
> Bundle-Version: 1.5.3
> Bundle-Activator:
> com.bankofamerica.capire.workbench.graphicaleditor.BundleAct ivatorPluginModule
>
> Bundle-Vendor: Capire Team
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.gef,
> org.eclipse.ui,
> org.eclipse.compare,
> org.eclipse.core.runtime,
> org.eclipse.core.resources,
> org.eclipse.ui.editors,
> org.eclipse.ui.views,
> org.eclipse.ui.workbench,
> org.eclipse.ui.workbench.texteditor,
> org.eclipse.ui.ide,
> org.eclipse.jface,
> org.eclipse.jface.text
> Eclipse-LazyStart: true
> Export-Package: com.bankofamerica.capire.workbench.graphicaleditor,
> com.bankofamerica.capire.workbench.graphicaleditor.actions,
> com.bankofamerica.capire.workbench.graphicaleditor.model,
> com.bankofamerica.capire.workbench.graphicaleditor.model.com mands,
> com.bankofamerica.capire.workbench.graphicaleditor.parts,
> com.bankofamerica.capire.workbench.actions,
> com.bankofamerica.capire.workbench.views
> Bundle-ClassPath: CapireWorkBench.jar,
> jacob.jar,
> castor-1.0M2-xml.jar,
> commons-logging.jar,
> xerces-J_1.4.0.jar,
> log4j-1.2.13.jar,
> servlet-api-2.5.jar,
> jetty.jar,
> jetty-util.jar,
> commons-validator-1.3.0.jar,
> ext/user-javaapi.jar,
> ext/commons-logging.jar,
> ext/commons-el.jar,
> ext/commons-logging-api.jar,
> ext/jasper-runtime.jar,
> ext/jasper-compiler.jar,
> jdbc/db2jcc_license_cisuz.jar,
> jdbc/db2jcc_zos.jar,
> jdbc/ojdbc14.jar,
> jdbc/terajdbc4.jar,
> jdbc/mysql-connector-java-3.1.12-bin.jar
>
>
Re: Eclipse 3.3.0 GEF fails with IndexOutOfBoundsException - works on Eclipse 3.2.1 [message #238389 is a reply to message #237460] Sat, 08 September 2007 01:47 Go to previous message
Eclipse User
Originally posted by: none.ibm.com

The last three lines below are new in 3.3:

protected void addSourceConnection(ConnectionEditPart connection, int index)
{
primAddSourceConnection(connection, index);

GraphicalEditPart source = (GraphicalEditPart) connection.getSource();
if (source != null)
source.getSourceConnections().remove(connection);

As the other reply said, the same connection being added twice could cause
this problem.
Previous Topic:[draw2d] Drop Shadow
Next Topic:saving figure into file
Goto Forum:
  


Current Time: Tue Sep 16 13:45:38 GMT 2014

Powered by FUDForum. Page generated in 0.03085 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software