Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Resource Beign Edited
Resource Beign Edited [message #233035] Mon, 29 June 2009 08:42 Go to next message
Alessandro Carraro is currently offline Alessandro CarraroFriend
Messages: 27
Registered: July 2009
Junior Member
Hi, I've some (imho simple for those like you that know what are doing ;-)
) problem

I've got a XML customization to support my company's XML-based language,
and I can content-assist / hyperlinking with the help of the
org.eclipse.wst.sse.ui.editorConfiguration.

I've got these problems/questions
1) I'm implementing an IQuickAssistProcessor, and what I've got in
computeQuickAssistProposals is a IQuickAssistInvocationContext which knows
only about the Viewer and the offset. Since the proposals depend by
project level properties, I must get somehow the current project. Since
looking at sources in WTP and in forums, I've managed to get the model,
I'm interested in particular to get the project by the model (IDOMNode),
also because here are other parts of my plugin that require that feature.
2) Is there a reason about having problem makers behave differently in the
source editor and in the problem view? I noticed that the same problem
markers, in the editor requires an IQuickAssistProcessor while in the
problem views require an IMarkerResolutionGenerator? What important part
am I missing?
3) Are there any resources on the web that explain how to do "Linked
editing" like those provided in refactorings in the JDT?
4) Is it possible to add a tab in the editor via ext points?

thanks in advice

Alex
Re: Resource Beign Edited [message #233061 is a reply to message #233035] Mon, 29 June 2009 18:40 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4490
Registered: July 2009
Senior Member

Alessandro Carraro wrote:
> I've got these problems/questions
> 1) I'm implementing an IQuickAssistProcessor, and what I've got in
> computeQuickAssistProposals is a IQuickAssistInvocationContext which
> knows only about the Viewer and the offset. Since the proposals depend
> by project level properties, I must get somehow the current project.
> Since looking at sources in WTP and in forums, I've managed to get the
> model, I'm interested in particular to get the project by the model
> (IDOMNode), also because here are other parts of my plugin that require
> that feature.

The model's base location should be a String of the in-workspace
full path for files in the workspace and the filesystem location for
files outside of the workspace.

> 2) Is there a reason about having problem makers behave differently in
> the source editor and in the problem view? I noticed that the same
> problem markers, in the editor requires an IQuickAssistProcessor while
> in the problem views require an IMarkerResolutionGenerator? What
> important part am I missing?

You might have JFace text Annotations inside of the editor that
don't correspond to on-disk Markers.

> 3) Are there any resources on the web that explain how to do "Linked
> editing" like those provided in refactorings in the JDT?

The source for org.eclipse.jface.text.templates.TemplateProposal is
probably the most helpful.

> 4) Is it possible to add a tab in the editor via ext points?
> thanks in advice

No, synchronizing selection for three tabs would be exponentially
trickier than for two, and few ideas for additional tabs would be
generic enough for any kind of XML file.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Resource Beign Edited [message #233112 is a reply to message #233061] Tue, 30 June 2009 08:14 Go to previous message
Alessandro Carraro is currently offline Alessandro CarraroFriend
Messages: 27
Registered: July 2009
Junior Member
Nitin Dahyabhai wrote:

> Alessandro Carraro wrote:
>> I've got these problems/questions
>> 1) I'm implementing an IQuickAssistProcessor, and what I've got in
>> computeQuickAssistProposals is a IQuickAssistInvocationContext which
>> knows only about the Viewer and the offset. Since the proposals depend
>> by project level properties, I must get somehow the current project.
>> Since looking at sources in WTP and in forums, I've managed to get the
>> model, I'm interested in particular to get the project by the model
>> (IDOMNode), also because here are other parts of my plugin that require
>> that feature.

> The model's base location should be a String of the in-workspace
> full path for files in the workspace and the filesystem location for
> files outside of the workspace.

Thanks!! I found that, but I was not sure it was the better way...

>> 2) Is there a reason about having problem makers behave differently in
>> the source editor and in the problem view? I noticed that the same
>> problem markers, in the editor requires an IQuickAssistProcessor while
>> in the problem views require an IMarkerResolutionGenerator? What
>> important part am I missing?

> You might have JFace text Annotations inside of the editor that
> don't correspond to on-disk Markers.

Ok, I see it. Thanks!

>> 3) Are there any resources on the web that explain how to do "Linked
>> editing" like those provided in refactorings in the JDT?

> The source for org.eclipse.jface.text.templates.TemplateProposal is
> probably the most helpful.

THANKS! It is much simpler than I thought!!

>> 4) Is it possible to add a tab in the editor via ext points?
>> thanks in advice

> No, synchronizing selection for three tabs would be exponentially
> trickier than for two, and few ideas for additional tabs would be
> generic enough for any kind of XML file.

I see. Maybe I will do this in a custom view.

Thanks, thanks, thanks for your quick reply!
Previous Topic:Galileo Server Tools, migration from MyEclipse
Next Topic:Re: WSDL Validator issue
Goto Forum:
  


Current Time: Sat Sep 21 10:47:55 GMT 2024

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

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

Back to the top