Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » SQL Editor
SQL Editor [message #70614] Tue, 25 July 2006 16:28 Go to next message
Eclipse UserFriend
Originally posted by: francine.grimmer.ncr.com

I am trying to display DDL in the SQL Editor frame from within the
DataSource Explorer. I have written my own SQLEditorStorageEditorInput
that generates the DDL and calls the setStorage with the text and
setConnectionInfo with the connection profile. Then I have my own
ObjectActionDelegate that has a run method that does the page.openEditor
and provides the input text. The DDL is displayed but I am getting the
following Null Pointer exception:

Error occurred while trying to install sql updater

java.lang.NullPointerException
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.rememberAnnotations(SQLUpdater.java:358)
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.removeMarkers(SQLUpdater.java:404)
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.update(SQLUpdater.java:188)
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.access$000(SQLUpdater.java:62)
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater$1.run(SQLUpdater.java:132)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1737)
at
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.run(SQLUpdater.java:128)
at
org.eclipse.datatools.sqltools.sqleditor.SQLEditor.installSQ LUpdater(SQLEditor.java:795)
at
org.eclipse.datatools.sqltools.sqleditor.SQLEditor.getAdapte r(SQLEditor.java:459)
at
org.eclipse.ui.views.contentoutline.ContentOutline.doCreateP age(ContentOutline.java:128)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.jav a:399)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView. java:743)
at
org.eclipse.ui.views.contentoutline.ContentOutline.partBroug htToTop(ContentOutline.java:209)
at
org.eclipse.ui.internal.PartListenerList$2.run(PartListenerL ist.java:87)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at
org.eclipse.ui.internal.PartListenerList.fireEvent(PartListe nerList.java:57)
at
org.eclipse.ui.internal.PartListenerList.firePartBroughtToTo p(PartListenerList.java:85)
at
org.eclipse.ui.internal.PartService.firePartBroughtToTop(Par tService.java:87)
at
org.eclipse.ui.internal.WorkbenchPagePartList.firePartBrough tToTop(WorkbenchPagePartList.java:75)
at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActiveEdit orChanged(WorkbenchPagePartList.java:51)
at org.eclipse.ui.internal.PartList.setActiveEditor(PartList.ja va:152)
at
org.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(Workb enchPage.java:1181)
at
org.eclipse.ui.internal.WorkbenchPage.updateActivePart(Workb enchPage.java:1126)
at
org.eclipse.ui.internal.WorkbenchPage.partAdded(WorkbenchPag e.java:1524)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:210)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:819)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:718)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:679)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2586)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2521)
at
org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2513)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2498)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2493)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2470)
at
com.ncr.teradata.datatools.dtp.catalog.popup.actions.Generat eDDLActionDelegate.run(GenerateDDLActionDelegate.java:78)

at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

When stepping through the code, it appears that the _annotationModel is
not getting set in SQLUpdater and then dereferenced in
SqlUpdater.rememberAnnotations(). I am not sure what I am missing???

I am calling page.openEditor, passing in the ID for the Eclipse SQLEditor.
I have also tried the SQLScrapebookEditor ID as well. Here is the code
snippet:

IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
try {
page.openEditor(new ShowDDLSQLEditorInput(schema.getName(),
database.getName(), table, connectionProfile),
"org.eclipse.datatools.sqltools.sqleditor.SQLEditor");
} catch (PartInitException e) {
System.out.println("CreateTableActionDelegate.run, PartInitException,
can't open editor - " + e.getMessage());
}


regards,
Francine Grimmer
Re: SQL Editor [message #70635 is a reply to message #70614] Tue, 25 July 2006 17:08 Go to previous message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
This is a bug that should be reported against the data tools project:
https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=D ataTools


"Francine" <francine.grimmer@ncr.com> wrote in message
news:107fd6e7df9f26515b3c1e869312dfa8$1@www.eclipse.org...
> I am trying to display DDL in the SQL Editor frame from within the
> DataSource Explorer. I have written my own SQLEditorStorageEditorInput
> that generates the DDL and calls the setStorage with the text and
> setConnectionInfo with the connection profile. Then I have my own
> ObjectActionDelegate that has a run method that does the page.openEditor
> and provides the input text. The DDL is displayed but I am getting the
> following Null Pointer exception:
>
> Error occurred while trying to install sql updater
>
> java.lang.NullPointerException
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.remember
Annotations(SQLUpdater.java:358)
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.removeMa
rkers(SQLUpdater.java:404)
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.update(S
QLUpdater.java:188)
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.access$0
00(SQLUpdater.java:62)
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater$1.run(SQ
LUpdater.java:132)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1737)
> at
>
org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQL Updater.run(SQLU
pdater.java:128)
> at
>
org.eclipse.datatools.sqltools.sqleditor.SQLEditor.installSQ LUpdater(SQLEdit
or.java:795)
> at
>
org.eclipse.datatools.sqltools.sqleditor.SQLEditor.getAdapte r(SQLEditor.java
:459)
> at
>
org.eclipse.ui.views.contentoutline.ContentOutline.doCreateP age(ContentOutli
ne.java:128)
> at org.eclipse.ui.part.PageBookView.createPage(PageBookView.jav a:399)
> at org.eclipse.ui.part.PageBookView.partActivated(PageBookView. java:743)
> at
>
org.eclipse.ui.views.contentoutline.ContentOutline.partBroug htToTop(ContentO
utline.java:209)
> at
> org.eclipse.ui.internal.PartListenerList$2.run(PartListenerL ist.java:87)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
> at
>
org.eclipse.ui.internal.PartListenerList.fireEvent(PartListe nerList.java:57)
> at
>
org.eclipse.ui.internal.PartListenerList.firePartBroughtToTo p(PartListenerLi
st.java:85)
> at
>
org.eclipse.ui.internal.PartService.firePartBroughtToTop(Par tService.java:87
)
> at
>
org.eclipse.ui.internal.WorkbenchPagePartList.firePartBrough tToTop(Workbench
PagePartList.java:75)
> at
>
org.eclipse.ui.internal.WorkbenchPagePartList.fireActiveEdit orChanged(Workbe
nchPagePartList.java:51)
> at org.eclipse.ui.internal.PartList.setActiveEditor(PartList.ja va:152)
> at
>
org.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(Workb enchPage.java:11
81)
> at
>
org.eclipse.ui.internal.WorkbenchPage.updateActivePart(Workb enchPage.java:11
26)
> at
> org.eclipse.ui.internal.WorkbenchPage.partAdded(WorkbenchPag e.java:1524)
> at
>
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:210
)
> at
>
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:819
)
> at
>
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager
..java:718)
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:679)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.ja
va:2586)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2521
)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2513)
> at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2498)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2493)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2470)
> at
>
com.ncr.teradata.datatools.dtp.catalog.popup.actions.Generat eDDLActionDelega
te.run(GenerateDDLActionDelegate.java:78)
>
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:539)
> at
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:488)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
tionItem.java:400)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:78)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(
EclipseAppLauncher.java:92)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAp
pLauncher.java:68)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
> When stepping through the code, it appears that the _annotationModel is
> not getting set in SQLUpdater and then dereferenced in
> SqlUpdater.rememberAnnotations(). I am not sure what I am missing???
>
> I am calling page.openEditor, passing in the ID for the Eclipse SQLEditor.
> I have also tried the SQLScrapebookEditor ID as well. Here is the code
> snippet:
>
> IWorkbenchPage page =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
> try {
> page.openEditor(new ShowDDLSQLEditorInput(schema.getName(),
> database.getName(), table, connectionProfile),
> "org.eclipse.datatools.sqltools.sqleditor.SQLEditor");
> } catch (PartInitException e) {
> System.out.println("CreateTableActionDelegate.run, PartInitException,
> can't open editor - " + e.getMessage());
> }
>
>
> regards,
> Francine Grimmer
>
>
Previous Topic:Quiestion about Remote Management?
Next Topic:The LogReaderService is not registered.
Goto Forum:
  


Current Time: Thu Apr 25 05:44:14 GMT 2024

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

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

Back to the top