|
From: snpe <sn...@sn...> - 2004-10-10 19:03:23
|
I have success with key bindings too.
I change methods :
org.springframework.ide.eclipse.beans.ui.actions.ShowInView#setActiveEditor(IAction action, IEditorPart editor)
and
org.springframework.ide.eclipse.beans.ui.actions.OpenJavaType#setActiveEditor(IAction action, IEditorPart editor)
to :
public void setActiveEditor(IAction action, IEditorPart editor) {
if (editor instanceof ITextEditor) {
this.editor = (ITextEditor) editor;
this.file = BeansUIUtils.getConfigFile(editor);
} else if (editor instanceof XMLMultiPageEditorPart) {
XMLMultiPageEditorPart multiEditor = (XMLMultiPageEditorPart) editor;
this.editor = multiEditor.getTextEditor();
this.file = BeansUIUtils.getConfigFile(this.editor);
} else {
this.editor = null;
this.file = null;
}
// Disable action if not a Spring config file is currently edited
action.setEnabled(this.file != null);
}
and all is fine, now
I don't know what about adding two plugins from webtools - it is problem, maybe, but spring ide is great for me now
Best regards
Haris Peco
On Sunday 10 October 2004 05:25 am, snpe wrote:
> I am wrong . It is multipage editor and I try next :
> method org.springframework.ide.eclipse.beans.ui.BeansUIUtils#openInEditor(IFile file, int line)
> public static IEditorPart openInEditor(IFile file, int line) {
> IEditorInput input = new FileEditorInput(file);
> IEditorPart editPart = openInEditor(input);
> if (editPart != null) {
> if (line != -1) {
> // go to specified line
> AbstractTextEditor editor;
> if (editPart instanceof AbstractTextEditor) {
> editor = (AbstractTextEditor) editPart;
> } else if (editPart instanceof XMLMultiPageEditorPart) {
> XMLMultiPageEditorPart multiEditor = (XMLMultiPageEditorPart) editPart;
> editor = multiEditor.getTextEditor();
> } else
> return editPart;
> IDocument doc = editor.getDocumentProvider().getDocument(input);
> if (doc != null) {
> try {
> int start = doc.getLineOffset(line - 1);
> editor.selectAndReveal(start, 0);
> } catch (BadLocationException e) {
> BeansUIPlugin.log(e);
> }
> }
> }
> }
> return editPart;
> }
>
> and key binding with scope "com.ibm.sse.edit.ui.structuredTextEditorScope", probably
> I don't success set key binding - is enough change binding in plugin.xml ?
>
> It work fine for me, but we have two webtools (myeclipse) plugins com.ibm.xmleditor and com.ibm.sse.editor
>
> best regards
> Haris Peco
> On Sunday 10 October 2004 12:50 am, snpe wrote:
> > Torsten,
> > It inherit AbstractTextEditor
> > This is hierarchy view
> > http://www.snpe.co.yu/sse.png
> >
> > regards
> > Haris Peco
> > On Saturday 09 October 2004 09:49 pm, Torsten Juergeleit wrote:
> > > I took a first glance on the MyEclipseIDE XML editor issue:
> > >
> > > This editor is a multipage editor which does not inherit from Eclipse's
> > > AbstractTextEditor (like e.g. XmlBuddy does). So it does not leverage
> > > the additional context menu entries or keybindings which Spring IDE
> > > added to AbstractTextEditor. Spring IDE is not able to navigate to the
> > > line number of the bean definition because this feature depends on
> > > AbstractTextEditor too.
> > >
> > > We have to port Spring IDE to Eclipse 3.0 to support navigation to the
> > > bean definition. It's very easy, we can use IDE.openInEditor() with an
> > > instance of IMarker holding the corresponding line number.
> > >
> > > Sorry, no solution to this right now.
> > >
> > > Cheers,
> > > Torsten
> > >
> > >
> > > On 09.10.2004, at 06:22, snpe wrote:
> > >
> > > > Torsten,
> > > > I build plugin from CVS HEAD (with plugin dependency problems)
> > > > It is very good now, but problem 2 is partial resolved
> > > > It is fine when I open config file in text editor, but I have xml
> > > > editor from myeclipse
> > > > (patched ibm webtools xml editor) - when I set this editor default
> > > > then select bean in beans view show begin of file always (text editor
> > > > go to bean declaration )
> > > > error markers work fine now (with text and xml editor)
> > > > Can I use another xml editor and which ?
> > > >
> > > > Thanks
> > > > On Saturday 09 October 2004 12:05 am, Torsten Juergeleit wrote:
> > > >> Haris,
> > > >>
> > > >> thank you for spotting these bugs.
> > > >>
> > > >> I fixed both and updated the plugin's update site with a new version.
> > > >> The version number of the feature and the plugins stayed the same. So
> > > >> you have to delete the feature and the plugins from your Eclipse
> > > >> installation directory first before you can download the new version
> > > >> via Eclipse's update manager. Or you can build the updated plugins
> > > >> from
> > > >> CVS head.
> > > >>
> > > >> Cheers,
> > > >> Torsten
> > > >>
> > > >>
> > > >> On 08.10.2004, at 03:59, snpe wrote:
> > > >>
> > > >>> I find bug for my problem 1
> > > >>> Method
> > > >>> org.springframework.ide.eclipse.beans.ui.graph.actions.OpenJavaType#r
> > > >>> un
> > > >>> have in line 64
> > > >>> IProject project = ((ProjectNode)
> > > >>> bean.getConfigFile().getParent()).getProject();
> > > >>> I change to
> > > >>> IProject project = bean.getConfigFile().getParent().getProject();
> > > >>> and it work now
> > > >>>
> > > >>> regards
> > > >>>
> > > >>> On Wednesday 06 October 2004 07:46 pm, snpe wrote:
> > > >>>> Hello,
> > > >>>> I have 2 problems with spring ide 1.1.0 (i try build form cvs and
> > > >>>> your first update for 1.1.0)
> > > >>>>
> > > >>>> 1) when I choose Open Java type in graph editor I get next error :
> > > >>>> java.lang.ClassCastException
> > > >>>> at
> > > >>>> org.springframework.ide.eclipse.beans.ui.graph.actions.OpenJavaType.
> > > >>>> ru
> > > >>>> n(OpenJavaType.java:64)
> > > >>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
> > > >>>> at
> > > >>>> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelectio
> > > >>>> n(
> > > >>>> ActionContributionItem.java:915)
> > > >>>> at
> > > >>>> org.eclipse.jface.action.ActionContributionItem.access$500(ActionCon
> > > >>>> tr
> > > >>>> ibutionItem.java:47)
> > > >>>> at
> > > >>>> org.eclipse.jface.action.ActionContributionItem$7.handleEvent(Action
> > > >>>> Co
> > > >>>> ntributionItem.java:785)
> > > >>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
> > > >>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
> > > >>>> at
> > > >>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2595)
> > > >>>> at
> > > >>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2298)
> > > >>>> at
> > > >>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
> > > >>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> > > >>>> at
> > > >>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.ja
> > > >>>> va
> > > >>>> :254)
> > > >>>> at
> > > >>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
> > > >>>> at
> > > >>>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:
> > > >>>> 96)
> > > >>>> at
> > > >>>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAc
> > > >>>> ti
> > > >>>> vator.java:335)
> > > >>>> at
> > > >>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.j
> > > >>>> av
> > > >>>> a:273)
> > > >>>> at
> > > >>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.j
> > > >>>> av
> > > >>>> a:129)
> > > >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >>>> at
> > > >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > > >>>> .j
> > > >>>> ava:39)
> > > >>>> at
> > > >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > > >>>> ss
> > > >>>> orImpl.java:25)
> > > >>>> at java.lang.reflect.Method.invoke(Method.java:324)
> > > >>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> > > >>>> at org.eclipse.core.launcher.Main.run(Main.java:704)
> > > >>>> at org.eclipse.core.launcher.Main.main(Main.java:688)
> > > >>>>
> > > >>>> 2) I haven't to select to element from beans view and error marker
> > > >>>> in
> > > >>>> xml editor (I use xml editor from myeclipse - ibm webtools
> > > >>>> contribution) - in text editor I have select and marker error, but
> > > >>>> marker don't disappear when I resolve error
> > > >>>>
> > > >>>> regards
> > > >>>> Haris Peco
> > > >>>> On Tuesday 05 October 2004 11:56 pm, Torsten Juergeleit wrote:
> > > >>>>> I prepared an update site from the current CVS head and uploaded it
> > > >>>>> to
> > > >>>>> the project's web site. The URL for Eclipse's update manager is
> > > >>>>> http://springide-eclip.sourceforge.net/updatesite/
> > > >>>>>
> > > >>>>> Maybe you can give it a try.
> > > >>>>>
> > > >>>>> Cheers,
> > > >>>>> Torsten
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> -------------------------------------------------------
> > > >>>>> This SF.net email is sponsored by: IT Product Guide on
> > > >>>>> ITManagersJournal
> > > >>>>> Use IT products in your business? Tell us what you think of them.
> > > >>>>> Give us
> > > >>>>> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
> > > >>>>> out more
> > > >>>>> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > >>>>> _______________________________________________
> > > >>>>> Springide-eclip-developer mailing list
> > > >>>>> Spr...@li...
> > > >>>>> https://lists.sourceforge.net/lists/listinfo/springide-eclip-
> > > >>>>> developer
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>>> -------------------------------------------------------
> > > >>>> This SF.net email is sponsored by: IT Product Guide on
> > > >>>> ITManagersJournal
> > > >>>> Use IT products in your business? Tell us what you think of them.
> > > >>>> Give us
> > > >>>> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
> > > >>>> out more
> > > >>>> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > >>>> _______________________________________________
> > > >>>> Springide-eclip-developer mailing list
> > > >>>> Spr...@li...
> > > >>>> https://lists.sourceforge.net/lists/listinfo/springide-eclip-
> > > >>>> developer
> > > >>>>
> > > >>>
> > > >>>
> > > >>> -------------------------------------------------------
> > > >>> This SF.net email is sponsored by: IT Product Guide on
> > > >>> ITManagersJournal
> > > >>> Use IT products in your business? Tell us what you think of them.
> > > >>> Give
> > > >>> us
> > > >>> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
> > > >>> out
> > > >>> more
> > > >>> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > >>> _______________________________________________
> > > >>> Springide-eclip-developer mailing list
> > > >>> Spr...@li...
> > > >>> https://lists.sourceforge.net/lists/listinfo/springide-eclip-
> > > >>> developer
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> -------------------------------------------------------
> > > >> This SF.net email is sponsored by: IT Product Guide on
> > > >> ITManagersJournal
> > > >> Use IT products in your business? Tell us what you think of them.
> > > >> Give us
> > > >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
> > > >> out more
> > > >> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > >> _______________________________________________
> > > >> Springide-eclip-developer mailing list
> > > >> Spr...@li...
> > > >> https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer
> > > >>
> > > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> > > Use IT products in your business? Tell us what you think of them. Give us
> > > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> > > http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > _______________________________________________
> > > Springide-eclip-developer mailing list
> > > Spr...@li...
> > > https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> > Use IT products in your business? Tell us what you think of them. Give us
> > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> > http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > _______________________________________________
> > Springide-eclip-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer
> >
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Springide-eclip-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer
>
|