Skip to main content



      Home
Home » Archived » Visual Editor (VE) » How to tell VE to use JET file with new visual class
How to tell VE to use JET file with new visual class [message #85455] Sun, 03 April 2005 13:30 Go to next message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

Hello,

is it possible to create a new visual class and make a JET file for it and
somehow point VE to that file when extending that class, perhaps in override
file for that class and if so please how to put it in override file.

Is there any reference for override files?

Thank you,
Danijel
Re: How to tell VE to use JET file with new visual class [message #85486 is a reply to message #85455] Mon, 04 April 2005 09:49 Go to previous messageGo to next message
Eclipse UserFriend
The contribution for the creation wizard is not clean (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157)

For now, you can just modify the templates in

....\org.eclipse.ve.java.core\templates\org\eclipse\ve\inter nal\java\codegen\jjet\wizards\contributors or add a new one.

For example,

org.eclipse.ve.internal.java.codegen.wizards.contributors.Sh ellSourceContributor drives the
ShellSourceTemplate.javajet template,

It is contributed in the org.eclipse.ve.swt plugin as following:


<extension
point="org.eclipse.ve.java.core.newStyleComponent">
<category
name="%NewStyleComponent.SWT"
id="org.eclipse.ve.swt.cat"
priority="100"
defaultExpand="false">
</category>
<visualElement
pluginId="org.eclipse.swt"
container="SWT_CONTAINER"
type="java.lang.Object"
icon="icons/full/clcl16/shell_obj.gif"
category="org.eclipse.ve.swt.cat"
contributor=" org.eclipse.ve.internal.java.codegen.wizards.contributors.Sh ellSourceContributor "
name="%NewStyleComponent.Shell">
</visualElement>
Re: How to tell VE to use JET file with new visual class [message #85894 is a reply to message #85486] Thu, 07 April 2005 14:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

Hello,

I have a problem loading javajet file. It looks like it is not included in
build. I have it in folder named templates/si/marand/codegen/jjet/

My contributor class:

public class IContainerContributor implements
IVisualClassCreationSourceContributor
{

/* (non-Javadoc)
* @see
org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
ibutor#needsFormatting()
*/
public boolean needsFormatting() {
return true;
}

/* (non-Javadoc)
* @see
org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
ibutor#getTemplateLocation()
*/
public URL getTemplateLocation() {
return JavaVEPlugin.getPlugin().find(new
Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
}
}

stack trace of exception :

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:284)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752)
at
org.eclipse.jdt.internal.ui.wizards.NewElementWizard.perform Finish(NewElemen
tWizard.java:115)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.pe
rformFinish(NewVisualClassCreationWizard.java:407)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:609)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:305)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:506)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
at org.eclipse.jface.window.Window.open(Window.java:648)
at
org.eclipse.ui.internal.ide.NewWizardShortcutAction.run(NewW izardShortcutAct
ion.java:96)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:866)
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
tionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
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.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)
Caused by: java.lang.NullPointerException
at
org.eclipse.core.internal.runtime.InternalPlatform.asLocalUR L(InternalPlatfo
rm.java:188)
at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:4 71)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ge
tGeneratorInstance(NewVisualClassCreationWizard.java:96)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ap
plyContributor(NewVisualClassCreationWizard.java:277)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.fi
nishPage(NewVisualClassCreationWizard.java:311)
at
org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.
java:108)
at
org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation
..java:34)
at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java
:700)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3246)
at
org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRu
nnableAdapter.java:65)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext
..java:101)

I'm shure that it is becouse of some wrong settings, do you know what could
it be?
Re: How to tell VE to use JET file with new visual class [message #85909 is a reply to message #85894] Thu, 07 April 2005 15:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What version of Eclipse are you on, what version of VE?

We don't support M6 of Eclipse yet. We are heads-down trying to get it
to work. The business of plugins becoming jars really caused a lot of
problems.


--
Thanks,
Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #85953 is a reply to message #85909] Thu, 07 April 2005 18:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

Hello,
I'm using eclipse 3.0.1 and VE 1.0.1could tht be a problem?


"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:d34377$alq$1@news.eclipse.org...
> What version of Eclipse are you on, what version of VE?
>
> We don't support M6 of Eclipse yet. We are heads-down trying to get it
> to work. The business of plugins becoming jars really caused a lot of
> problems.
>
>
> --
> Thanks,
> Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #85967 is a reply to message #85909] Thu, 07 April 2005 19:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

Hello,

is it possible that not having an override file for my visual class is a
problem.

Should there be anythig extra to do if I want the javajet file to be in
run-time workbench beside telling that folder shuld be included in binary
build. Shoul I use some extra exstension or maybe include the javajet file
in runtime.jar (if so, please tell me how).

I know the part of problem is I'm don't use eclipse long enough to
understand it as much as I should, so maybe there is something in settings I
forgot. It is silly to ask you if you know what I forgot, but if you tell me
what has to be done to make new visual class which uses javajet file for its
code generation I would be wery happy.

If it helps you I can describe wanted result and what I did so far:

So far I created new component which simply extends JPanel and has its own
beaninfo class and I can now chose it from palete and I used
NewStyleComponent extension so I can chose it when creating new visual
class. But the problem is that I would need to generate code for it which
looks like the fallowing sample, which looks like it looks partly becouse of
coding standards we use and was adopted before I started to work on that job
and partly becouse we use our own framework that offers a programmer
posibility to code an application without making a decision wheater will it
be run as Swing or HTML. So here is the sample code:

public class MyContainer extends IContainer
{
private ITextField m_textField;

void MyContainer()
{
super();
buildUi();
}

private void buildUi()
{
buildComponents();
buildLayout();
}

private void buildComponents()
{
//here we create all components that are all interfaces and can be
run as Swing or HTML so we instantiate them with MafFactory class (MAF =
Marand //framework)
m_textField = MafFactory.getInstance().createTextField();
}

private void buildLayout()
{
// here we build lyout with special GridBagLayoutHelper which is
part of our framework
GridBagLayoutHelper helper = new GridBagLayoutHelper(this, 1, 1);
helper.add(m_textField);
}
}

So as much as I understand javajet is responsible for generatig upper code
frame and overrides are responsible for putting every new component
decleration in class and inicialisation in buildComponents() method? Plase
tell me if I misunderstood the poces and dont forget on current problem
(javajet file can't be found when I run plugin in run-time wokbench).

Sory for such a long post and, if you need to take a time to answer it I
won't mind.

Thank you,
Danijel
Re: How to tell VE to use JET file with new visual class [message #86043 is a reply to message #85967] Fri, 08 April 2005 09:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Gili will need to answer the question about code generation. I don't
know that area of the code.


--
Thanks,
Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #86089 is a reply to message #85894] Fri, 08 April 2005 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Hello,
Is this folder containing the javajet template
(templates/si/marand/codegen/jjet/IContainerTemplate.javajet ) created
inside the org.eclipse.ve.java.core/ plugin, or is it created in your
own custom plugin?
Regards,
Sri.

ddd wrote:
> Hello,
>
> I have a problem loading javajet file. It looks like it is not included in
> build. I have it in folder named templates/si/marand/codegen/jjet/
>
> My contributor class:
>
> public class IContainerContributor implements
> IVisualClassCreationSourceContributor
> {
>
> /* (non-Javadoc)
> * @see
> org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
> ibutor#needsFormatting()
> */
> public boolean needsFormatting() {
> return true;
> }
>
> /* (non-Javadoc)
> * @see
> org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
> ibutor#getTemplateLocation()
> */
> public URL getTemplateLocation() {
> return JavaVEPlugin.getPlugin().find(new
> Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
> }
> }
>
> stack trace of exception :
>
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:284)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752)
> at
> org.eclipse.jdt.internal.ui.wizards.NewElementWizard.perform Finish(NewElemen
> tWizard.java:115)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.pe
> rformFinish(NewVisualClassCreationWizard.java:407)
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:609)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:305)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:506)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
> at org.eclipse.jface.window.Window.open(Window.java:648)
> at
> org.eclipse.ui.internal.ide.NewWizardShortcutAction.run(NewW izardShortcutAct
> ion.java:96)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:915)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:866)
> at
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
> tionItem.java:785)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:335)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> 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.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)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.core.internal.runtime.InternalPlatform.asLocalUR L(InternalPlatfo
> rm.java:188)
> at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:4 71)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ge
> tGeneratorInstance(NewVisualClassCreationWizard.java:96)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ap
> plyContributor(NewVisualClassCreationWizard.java:277)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.fi
> nishPage(NewVisualClassCreationWizard.java:311)
> at
> org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.
> java:108)
> at
> org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation
> .java:34)
> at
> org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java
> :700)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673)
> at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3246)
> at
> org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRu
> nnableAdapter.java:65)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext
> .java:101)
>
> I'm shure that it is becouse of some wrong settings, do you know what could
> it be?
>
>
>
Re: How to tell VE to use JET file with new visual class [message #86134 is a reply to message #86089] Fri, 08 April 2005 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

It is created in my plugin.If this is a problem how can I make VE to look in
my plugin.

Thank you,
Danijel
Re: How to tell VE to use JET file with new visual class [message #86149 is a reply to message #86134] Fri, 08 April 2005 13:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi Danijel
If it is created in your own plugin then the getTemplateLocation()
method of your contributor should return the location relative to your
plugin. So your contributor should read something like:

public class IContainerContributor implements
IVisualClassCreationSourceContributor
{
public boolean needsFormatting() {return true;}
public URL getTemplateLocation() {
return MYPLUGIN.getDefault().find(new
Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
}
}

You shouldnt look at JavaVEPlugin, but rather at MYPLUGIN.

Currently VE keeps all templates at one location to simplify
maintainence, however the JFC templates should move into the JFC plugin,
the SWT templates should move into the SWT plugin etc. The defect for
that is https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157 .

Regards,
Sri.




ddd wrote:
> It is created in my plugin.If this is a problem how can I make VE to look in
> my plugin.
>
> Thank you,
> Danijel
>
>
Re: How to tell VE to use JET file with new visual class [message #86268 is a reply to message #86149] Sat, 09 April 2005 10:16 Go to previous message
Eclipse UserFriend
Originally posted by: danijel_zecevic.hotmail.com

Thanks Sri, you helped a lot..

It was actualy silly question an a small thig after all.

Thanks again,
Danijel


"Sri Gunturi" <sgunturi@us.ibm.com> wrote in message
news:d36e1c$dm1$1@news.eclipse.org...
> Hi Danijel
> If it is created in your own plugin then the getTemplateLocation()
> method of your contributor should return the location relative to your
> plugin. So your contributor should read something like:
>
> public class IContainerContributor implements
> IVisualClassCreationSourceContributor
> {
> public boolean needsFormatting() {return true;}
> public URL getTemplateLocation() {
> return MYPLUGIN.getDefault().find(new
> Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
> }
> }
>
> You shouldnt look at JavaVEPlugin, but rather at MYPLUGIN.
>
> Currently VE keeps all templates at one location to simplify
> maintainence, however the JFC templates should move into the JFC plugin,
> the SWT templates should move into the SWT plugin etc. The defect for
> that is https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157 .
>
> Regards,
> Sri.
>
>
>
>
> ddd wrote:
> > It is created in my plugin.If this is a problem how can I make VE to
look in
> > my plugin.
> >
> > Thank you,
> > Danijel
> >
> >
Re: How to tell VE to use JET file with new visual class [message #606232 is a reply to message #85455] Mon, 04 April 2005 09:49 Go to previous message
Eclipse UserFriend
The contribution for the creation wizard is not clean (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157)

For now, you can just modify the templates in

....\org.eclipse.ve.java.core\templates\org\eclipse\ve\inter nal\java\codegen\jjet\wizards\contributors or add a new one.

For example,

org.eclipse.ve.internal.java.codegen.wizards.contributors.Sh ellSourceContributor drives the
ShellSourceTemplate.javajet template,

It is contributed in the org.eclipse.ve.swt plugin as following:


<extension
point="org.eclipse.ve.java.core.newStyleComponent">
<category
name="%NewStyleComponent.SWT"
id="org.eclipse.ve.swt.cat"
priority="100"
defaultExpand="false">
</category>
<visualElement
pluginId="org.eclipse.swt"
container="SWT_CONTAINER"
type="java.lang.Object"
icon="icons/full/clcl16/shell_obj.gif"
category="org.eclipse.ve.swt.cat"
contributor=" org.eclipse.ve.internal.java.codegen.wizards.contributors.Sh ellSourceContributor "
name="%NewStyleComponent.Shell">
</visualElement>
Re: How to tell VE to use JET file with new visual class [message #606289 is a reply to message #85486] Thu, 07 April 2005 14:04 Go to previous message
Eclipse UserFriend
Hello,

I have a problem loading javajet file. It looks like it is not included in
build. I have it in folder named templates/si/marand/codegen/jjet/

My contributor class:

public class IContainerContributor implements
IVisualClassCreationSourceContributor
{

/* (non-Javadoc)
* @see
org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
ibutor#needsFormatting()
*/
public boolean needsFormatting() {
return true;
}

/* (non-Javadoc)
* @see
org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
ibutor#getTemplateLocation()
*/
public URL getTemplateLocation() {
return JavaVEPlugin.getPlugin().find(new
Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
}
}

stack trace of exception :

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:284)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752)
at
org.eclipse.jdt.internal.ui.wizards.NewElementWizard.perform Finish(NewElemen
tWizard.java:115)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.pe
rformFinish(NewVisualClassCreationWizard.java:407)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:609)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:305)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:506)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
at org.eclipse.jface.window.Window.open(Window.java:648)
at
org.eclipse.ui.internal.ide.NewWizardShortcutAction.run(NewW izardShortcutAct
ion.java:96)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:866)
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
tionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
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.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)
Caused by: java.lang.NullPointerException
at
org.eclipse.core.internal.runtime.InternalPlatform.asLocalUR L(InternalPlatfo
rm.java:188)
at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:4 71)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ge
tGeneratorInstance(NewVisualClassCreationWizard.java:96)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ap
plyContributor(NewVisualClassCreationWizard.java:277)
at
org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.fi
nishPage(NewVisualClassCreationWizard.java:311)
at
org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.
java:108)
at
org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation
..java:34)
at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java
:700)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3246)
at
org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRu
nnableAdapter.java:65)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext
..java:101)

I'm shure that it is becouse of some wrong settings, do you know what could
it be?
Re: How to tell VE to use JET file with new visual class [message #607041 is a reply to message #85894] Thu, 07 April 2005 15:51 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What version of Eclipse are you on, what version of VE?

We don't support M6 of Eclipse yet. We are heads-down trying to get it
to work. The business of plugins becoming jars really caused a lot of
problems.


--
Thanks,
Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #607049 is a reply to message #85909] Thu, 07 April 2005 18:29 Go to previous message
Eclipse UserFriend
Hello,
I'm using eclipse 3.0.1 and VE 1.0.1could tht be a problem?


"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:d34377$alq$1@news.eclipse.org...
> What version of Eclipse are you on, what version of VE?
>
> We don't support M6 of Eclipse yet. We are heads-down trying to get it
> to work. The business of plugins becoming jars really caused a lot of
> problems.
>
>
> --
> Thanks,
> Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #607052 is a reply to message #85909] Thu, 07 April 2005 19:16 Go to previous message
Eclipse UserFriend
Hello,

is it possible that not having an override file for my visual class is a
problem.

Should there be anythig extra to do if I want the javajet file to be in
run-time workbench beside telling that folder shuld be included in binary
build. Shoul I use some extra exstension or maybe include the javajet file
in runtime.jar (if so, please tell me how).

I know the part of problem is I'm don't use eclipse long enough to
understand it as much as I should, so maybe there is something in settings I
forgot. It is silly to ask you if you know what I forgot, but if you tell me
what has to be done to make new visual class which uses javajet file for its
code generation I would be wery happy.

If it helps you I can describe wanted result and what I did so far:

So far I created new component which simply extends JPanel and has its own
beaninfo class and I can now chose it from palete and I used
NewStyleComponent extension so I can chose it when creating new visual
class. But the problem is that I would need to generate code for it which
looks like the fallowing sample, which looks like it looks partly becouse of
coding standards we use and was adopted before I started to work on that job
and partly becouse we use our own framework that offers a programmer
posibility to code an application without making a decision wheater will it
be run as Swing or HTML. So here is the sample code:

public class MyContainer extends IContainer
{
private ITextField m_textField;

void MyContainer()
{
super();
buildUi();
}

private void buildUi()
{
buildComponents();
buildLayout();
}

private void buildComponents()
{
//here we create all components that are all interfaces and can be
run as Swing or HTML so we instantiate them with MafFactory class (MAF =
Marand //framework)
m_textField = MafFactory.getInstance().createTextField();
}

private void buildLayout()
{
// here we build lyout with special GridBagLayoutHelper which is
part of our framework
GridBagLayoutHelper helper = new GridBagLayoutHelper(this, 1, 1);
helper.add(m_textField);
}
}

So as much as I understand javajet is responsible for generatig upper code
frame and overrides are responsible for putting every new component
decleration in class and inicialisation in buildComponents() method? Plase
tell me if I misunderstood the poces and dont forget on current problem
(javajet file can't be found when I run plugin in run-time wokbench).

Sory for such a long post and, if you need to take a time to answer it I
won't mind.

Thank you,
Danijel
Re: How to tell VE to use JET file with new visual class [message #607063 is a reply to message #85967] Fri, 08 April 2005 09:50 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Gili will need to answer the question about code generation. I don't
know that area of the code.


--
Thanks,
Rich Kulp
Re: How to tell VE to use JET file with new visual class [message #607069 is a reply to message #85894] Fri, 08 April 2005 10:45 Go to previous message
Eclipse UserFriend
Hello,
Is this folder containing the javajet template
(templates/si/marand/codegen/jjet/IContainerTemplate.javajet ) created
inside the org.eclipse.ve.java.core/ plugin, or is it created in your
own custom plugin?
Regards,
Sri.

ddd wrote:
> Hello,
>
> I have a problem loading javajet file. It looks like it is not included in
> build. I have it in folder named templates/si/marand/codegen/jjet/
>
> My contributor class:
>
> public class IContainerContributor implements
> IVisualClassCreationSourceContributor
> {
>
> /* (non-Javadoc)
> * @see
> org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
> ibutor#needsFormatting()
> */
> public boolean needsFormatting() {
> return true;
> }
>
> /* (non-Javadoc)
> * @see
> org.eclipse.ve.internal.java.codegen.wizards.IVisualClassCre ationSourceContr
> ibutor#getTemplateLocation()
> */
> public URL getTemplateLocation() {
> return JavaVEPlugin.getPlugin().find(new
> Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
> }
> }
>
> stack trace of exception :
>
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:284)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752)
> at
> org.eclipse.jdt.internal.ui.wizards.NewElementWizard.perform Finish(NewElemen
> tWizard.java:115)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.pe
> rformFinish(NewVisualClassCreationWizard.java:407)
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:609)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:305)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:506)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
> at org.eclipse.jface.window.Window.open(Window.java:648)
> at
> org.eclipse.ui.internal.ide.NewWizardShortcutAction.run(NewW izardShortcutAct
> ion.java:96)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:915)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:866)
> at
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
> tionItem.java:785)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2773)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2432)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:335)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> 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.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)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.core.internal.runtime.InternalPlatform.asLocalUR L(InternalPlatfo
> rm.java:188)
> at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:4 71)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ge
> tGeneratorInstance(NewVisualClassCreationWizard.java:96)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.ap
> plyContributor(NewVisualClassCreationWizard.java:277)
> at
> org.eclipse.ve.internal.java.codegen.wizards.NewVisualClassC reationWizard.fi
> nishPage(NewVisualClassCreationWizard.java:311)
> at
> org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.
> java:108)
> at
> org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation
> .java:34)
> at
> org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java
> :700)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673)
> at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3246)
> at
> org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRu
> nnableAdapter.java:65)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext
> .java:101)
>
> I'm shure that it is becouse of some wrong settings, do you know what could
> it be?
>
>
>
Re: How to tell VE to use JET file with new visual class [message #607075 is a reply to message #86089] Fri, 08 April 2005 11:40 Go to previous message
Eclipse UserFriend
It is created in my plugin.If this is a problem how can I make VE to look in
my plugin.

Thank you,
Danijel
Re: How to tell VE to use JET file with new visual class [message #607076 is a reply to message #86134] Fri, 08 April 2005 13:07 Go to previous message
Eclipse UserFriend
Hi Danijel
If it is created in your own plugin then the getTemplateLocation()
method of your contributor should return the location relative to your
plugin. So your contributor should read something like:

public class IContainerContributor implements
IVisualClassCreationSourceContributor
{
public boolean needsFormatting() {return true;}
public URL getTemplateLocation() {
return MYPLUGIN.getDefault().find(new
Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
}
}

You shouldnt look at JavaVEPlugin, but rather at MYPLUGIN.

Currently VE keeps all templates at one location to simplify
maintainence, however the JFC templates should move into the JFC plugin,
the SWT templates should move into the SWT plugin etc. The defect for
that is https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157 .

Regards,
Sri.




ddd wrote:
> It is created in my plugin.If this is a problem how can I make VE to look in
> my plugin.
>
> Thank you,
> Danijel
>
>
Re: How to tell VE to use JET file with new visual class [message #607084 is a reply to message #86149] Sat, 09 April 2005 10:16 Go to previous message
Eclipse UserFriend
Thanks Sri, you helped a lot..

It was actualy silly question an a small thig after all.

Thanks again,
Danijel


"Sri Gunturi" <sgunturi@us.ibm.com> wrote in message
news:d36e1c$dm1$1@news.eclipse.org...
> Hi Danijel
> If it is created in your own plugin then the getTemplateLocation()
> method of your contributor should return the location relative to your
> plugin. So your contributor should read something like:
>
> public class IContainerContributor implements
> IVisualClassCreationSourceContributor
> {
> public boolean needsFormatting() {return true;}
> public URL getTemplateLocation() {
> return MYPLUGIN.getDefault().find(new
> Path("templates/si/marand/codegen/jjet/IContainerTemplate.javajet "));
> }
> }
>
> You shouldnt look at JavaVEPlugin, but rather at MYPLUGIN.
>
> Currently VE keeps all templates at one location to simplify
> maintainence, however the JFC templates should move into the JFC plugin,
> the SWT templates should move into the SWT plugin etc. The defect for
> that is https://bugs.eclipse.org/bugs/show_bug.cgi?id=90157 .
>
> Regards,
> Sri.
>
>
>
>
> ddd wrote:
> > It is created in my plugin.If this is a problem how can I make VE to
look in
> > my plugin.
> >
> > Thank you,
> > Danijel
> >
> >
Previous Topic:Help me get VE to work, please???
Next Topic:My bean extends JPanel and is not visible when I choo it as a new Visual component
Goto Forum:
  


Current Time: Tue Jun 17 16:02:12 EDT 2025

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

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

Back to the top