Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Extension Problem
Extension Problem [message #71206] Wed, 10 November 2004 22:20 Go to next message
Eclipse UserFriend
Originally posted by: fgdsfg.dfsfs.com

Hi,

I'm currently working on two plugins: an extention of the VE palette and a
project creation from a library. It works well but I have few questions.

-Is it possible to add code when a property is changed. For example, I have
created an EnhancedJButton and when the visible property is changed, I would
like to add a few lines of code in addition to the "setVisible(false)".

-Is it possible to modify the default syntax highlight of the Java editor of
VE. (like "foo" to be highlighted like a keyword.)

-When a project of my plugin is created, a visual class is automaticly
created and openend in VE. I would like the VE`s editor View to show the
design view "maximized" and the second part (the java editor)to be
"minimized". Is it possible?

thanks in advance for your help

Daniel Godbout
Re: Extension Problem [message #71270 is a reply to message #71206] Thu, 11 November 2004 11:55 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi ytoyo,

> -Is it possible to add code when a property is changed. For example, I have
> created an EnhancedJButton and when the visible property is changed, I would
> like to add a few lines of code in addition to the "setVisible(false)".

Generally not - the properties come from introspection where get and set
method pairs are combined. If the extra lines were inserted would they
need to be remove if the property were unset or set to "true" ?

What are the extra lines you want to insert ? I'm curious to know more
about what the scenario is to see whether it's a general one or
something that maybe can be done in another way.

> -Is it possible to modify the default syntax highlight of the Java editor of
> VE. (like "foo" to be highlighted like a keyword.)

The Java editor in the VE is just the regular Java editor embeded (in
fact we subclass it and add the design view on top). I don't think you
can do this in the Java editor, although if you enabled "show
occurences" you can select a word and see other references and usages of
it, and also Ctrl+J puts you into search mode where you can type a
string and find occurences of it. If you want to get the option to
enable particular words permanently you might want to raise a feature
request against the JDT editor or ask on the jdt newsgroup.

> -When a project of my plugin is created, a visual class is automaticly
> created and openend in VE. I would like the VE`s editor View to show the
> design view "maximized" and the second part (the java editor)to be
> "minimized". Is it possible?

Not right now. What you can do is change the VE show the editors are
shown as tabs instead of with a separator - this is done using the
Visual Editor preferences. Is this enough ?

Best regards,

Joe Winchester
Re: Extension Problem [message #71481 is a reply to message #71270] Thu, 11 November 2004 21:53 Go to previous message
Eclipse UserFriend
Originally posted by: fgdsfg.dfsfs.com

Hi Joe,

> Generally not - the properties come from introspection where get and set
> method pairs are combined. If the extra lines were inserted would they
> need to be remove if the property were unset or set to "true" ?

Yes they would, and new lines would be added.

> What are the extra lines you want to insert ? I'm curious to know more
> about what the scenario is to see whether it's a general one or
> something that maybe can be done in another way.

It would be to add a new method (and it's body) and call it. I think it can
be done in an other way, but I was wondering if it could be done that way.

> Not right now. What you can do is change the VE show the editors are
> shown as tabs instead of with a separator - this is done using the
> Visual Editor preferences. Is this enough ?

Yes, that's great, but is there a way to force it so it shows that way even
if user's preferences aren't that way?

Also, i noticed that if I create a TextField and i change it's field name to
"Name", I get an error because the method getName() already exist (I know
this is normal, but I was wondering if it's possible to deny users to set
the property to that value or to name the method an other name.)

Thanks a lot

Daniel Godbout
Re: Extension Problem [message #602959 is a reply to message #71206] Thu, 11 November 2004 11:55 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi ytoyo,

> -Is it possible to add code when a property is changed. For example, I have
> created an EnhancedJButton and when the visible property is changed, I would
> like to add a few lines of code in addition to the "setVisible(false)".

Generally not - the properties come from introspection where get and set
method pairs are combined. If the extra lines were inserted would they
need to be remove if the property were unset or set to "true" ?

What are the extra lines you want to insert ? I'm curious to know more
about what the scenario is to see whether it's a general one or
something that maybe can be done in another way.

> -Is it possible to modify the default syntax highlight of the Java editor of
> VE. (like "foo" to be highlighted like a keyword.)

The Java editor in the VE is just the regular Java editor embeded (in
fact we subclass it and add the design view on top). I don't think you
can do this in the Java editor, although if you enabled "show
occurences" you can select a word and see other references and usages of
it, and also Ctrl+J puts you into search mode where you can type a
string and find occurences of it. If you want to get the option to
enable particular words permanently you might want to raise a feature
request against the JDT editor or ask on the jdt newsgroup.

> -When a project of my plugin is created, a visual class is automaticly
> created and openend in VE. I would like the VE`s editor View to show the
> design view "maximized" and the second part (the java editor)to be
> "minimized". Is it possible?

Not right now. What you can do is change the VE show the editors are
shown as tabs instead of with a separator - this is done using the
Visual Editor preferences. Is this enough ?

Best regards,

Joe Winchester
Re: Extension Problem [message #603004 is a reply to message #71270] Thu, 11 November 2004 21:53 Go to previous message
Eclipse UserFriend
Originally posted by: fgdsfg.dfsfs.com

Hi Joe,

> Generally not - the properties come from introspection where get and set
> method pairs are combined. If the extra lines were inserted would they
> need to be remove if the property were unset or set to "true" ?

Yes they would, and new lines would be added.

> What are the extra lines you want to insert ? I'm curious to know more
> about what the scenario is to see whether it's a general one or
> something that maybe can be done in another way.

It would be to add a new method (and it's body) and call it. I think it can
be done in an other way, but I was wondering if it could be done that way.

> Not right now. What you can do is change the VE show the editors are
> shown as tabs instead of with a separator - this is done using the
> Visual Editor preferences. Is this enough ?

Yes, that's great, but is there a way to force it so it shows that way even
if user's preferences aren't that way?

Also, i noticed that if I create a TextField and i change it's field name to
"Name", I get an error because the method getName() already exist (I know
this is normal, but I was wondering if it's possible to deny users to set
the property to that value or to name the method an other name.)

Thanks a lot

Daniel Godbout
Previous Topic:VE Unable to parse specific code
Next Topic:Visual Editor on Mac OSX
Goto Forum:
  


Current Time: Mon Dec 30 16:45:57 GMT 2024

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

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

Back to the top