Step towards more generic editor [message #421287] |
Sun, 03 August 2008 08:16 |
|
This is a multi-part message in MIME format.
--------------020004090908000500050802
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I'm trying to build several concrete editors that subclass a generic
base editor. The base editor is generated from a base model which is
mostly empty, just to have code for an editor generated. The derived
editors are mostly empty:
|/**
* @generated NOT
*/
*public class *ProjectEditor *extends *BaseEditor
{
*public *ProjectEditor()
{
}
}|
It's very impractical though that in the generated BaseEditor there are
many references to BaseEditorPlugin.INSTANCE. The derived editors would
like to override plugin instance used in BaseEditor.
Would it be possible to add an instance field in the generated editor?
Like this:
| /**
* @generated
*/
*protected *EMFPlugin plugin = BaseEditorPlugin.INSTANCE;|
Or something similar...
Cheers
/Eike
--------------020004090908000500050802
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I'm trying to build several concrete editors that subclass a generic
base editor. The base editor is generated from a base model which is
mostly empty, just to have code for an editor generated. The derived
editors are mostly empty:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#3f5fbf">/**</font><br>
<font color="#ffffff">
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: Step towards more generic editor [message #421288 is a reply to message #421287] |
Sun, 03 August 2008 08:22 |
|
This is a multi-part message in MIME format.
--------------060306070502000600000006
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
BTW the same change would be appreciated for the action bar contributor
and the model wizard.
In addition in the editor the two getString() methods would have to be
made unstatic.
Cheers
/Eike
Eike Stepper schrieb:
> Hi,
>
> I'm trying to build several concrete editors that subclass a generic
> base editor. The base editor is generated from a base model which is
> mostly empty, just to have code for an editor generated. The derived
> editors are mostly empty:
>
> |/**
> * @generated NOT
> */
> *public class *ProjectEditor *extends *BaseEditor
> {
> *public *ProjectEditor()
> {
> }
> }|
>
>
> It's very impractical though that in the generated BaseEditor there
> are many references to BaseEditorPlugin.INSTANCE. The derived editors
> would like to override plugin instance used in BaseEditor.
>
> Would it be possible to add an instance field in the generated editor?
> Like this:
>
> | /**
> * @generated
> */
> *protected *EMFPlugin plugin = BaseEditorPlugin.INSTANCE;|
>
>
> Or something similar...
>
> Cheers
> /Eike
>
--------------060306070502000600000006
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
BTW the same change would be appreciated for the action bar contributor
and the model wizard.<br>
In addition in the editor the two getString() methods would have to be
made unstatic.<br>
<br>
Cheers<br>
/Eike<br>
<br>
<br>
<br>
Eike Stepper schrieb:
<blockquote cite="mid:g73phc$800$1@build.eclipse.org" type="cite">Hi,<br>
<br>
I'm trying to build several concrete editors that subclass a generic
base editor. The base editor is generated from a base model which is
mostly empty, just to have code for an editor generated. The derived
editors are mostly empty:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; ">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = --><!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#3f5fbf">/**</font><br>
<font color="#ffffff">
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: Step towards more generic editor [message #421289 is a reply to message #421288] |
Sun, 03 August 2008 08:44 |
|
This is a multi-part message in MIME format.
--------------020809030302060002080307
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
And there seems to be a problem with the resource locator:
java.util.MissingResourceException: The string resource
'_UI_BaseEditor_menu' could not be located
at
org.eclipse.emf.common.util.DelegatingResourceLocator.delega tedGetString(DelegatingResourceLocator.java:487)
at
org.eclipse.emf.common.util.DelegatingResourceLocator.getStr ing(DelegatingResourceLocator.java:392)
at
org.eclipse.emf.common.util.DelegatingResourceLocator.getStr ing(DelegatingResourceLocator.java:366)
at
org.eclipse.net4j.pop.base.editor.BaseActionBarContributor.c ontributeToMenu(BaseActionBarContributor.java:193)
Although the derived plugin has the following:
| /**
* @generated
*/
*public *ProjectEditorPlugin()
{
*super*(*new *ResourceLocator[] { BasePlugin.INSTANCE, });
}|
Shouldn't the derived plugin be able to see the contents of the
plugin.properties file of the base plugin?
Cheers
/Eike
Eike Stepper schrieb:
> BTW the same change would be appreciated for the action bar
> contributor and the model wizard.
> In addition in the editor the two getString() methods would have to be
> made unstatic.
>
> Cheers
> /Eike
>
>
>
> Eike Stepper schrieb:
>> Hi,
>>
>> I'm trying to build several concrete editors that subclass a generic
>> base editor. The base editor is generated from a base model which is
>> mostly empty, just to have code for an editor generated. The derived
>> editors are mostly empty:
>>
>> |/**
>> * @generated NOT
>> */
>> *public class *ProjectEditor *extends *BaseEditor
>> {
>> *public *ProjectEditor()
>> {
>> }
>> }|
>>
>>
>> It's very impractical though that in the generated BaseEditor there
>> are many references to BaseEditorPlugin.INSTANCE. The derived editors
>> would like to override plugin instance used in BaseEditor.
>>
>> Would it be possible to add an instance field in the generated editor?
>> Like this:
>>
>> | /**
>> * @generated
>> */
>> *protected *EMFPlugin plugin = BaseEditorPlugin.INSTANCE;|
>>
>>
>> Or something similar...
>>
>> Cheers
>> /Eike
>>
--------------020809030302060002080307
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
And there seems to be a problem with the resource locator:<br>
<br>
java.util.MissingResourceException: The string resource
'_UI_BaseEditor_menu' could not be located<br>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: Step towards more generic editor [message #421305 is a reply to message #421302] |
Sun, 03 August 2008 17:50 |
|
This is a multi-part message in MIME format.
--------------020105090109000807090301
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Ed Merks schrieb:
> Eike,
>
> All these things are possible.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=242994
> Shouldn't it be BaseEditorPlugin below?
Yes, seems so. I wonder how this code arrived there!
Cheers
/Eike
>
>
> Eike Stepper wrote:
>> And there seems to be a problem with the resource locator:
>>
>> java.util.MissingResourceException: The string resource
>> '_UI_BaseEditor_menu' could not be located
>> at
>> org.eclipse.emf.common.util.DelegatingResourceLocator.delega tedGetString(DelegatingResourceLocator.java:487)
>> at
>> org.eclipse.emf.common.util.DelegatingResourceLocator.getStr ing(DelegatingResourceLocator.java:392)
>> at
>> org.eclipse.emf.common.util.DelegatingResourceLocator.getStr ing(DelegatingResourceLocator.java:366)
>> at
>> org.eclipse.net4j.pop.base.editor.BaseActionBarContributor.c ontributeToMenu(BaseActionBarContributor.java:193)
>>
>>
>> Although the derived plugin has the following:
>>
>> | /**
>> * @generated
>> */
>> *public *ProjectEditorPlugin()
>> {
>> *super*(*new *ResourceLocator[] { BasePlugin.INSTANCE, });
>> }|
>>
>>
>> Shouldn't the derived plugin be able to see the contents of the
>> plugin.properties file of the base plugin?
>>
>> Cheers
>> /Eike
>>
>>
>>
>> Eike Stepper schrieb:
>>> BTW the same change would be appreciated for the action bar
>>> contributor and the model wizard.
>>> In addition in the editor the two getString() methods would have to
>>> be made unstatic.
>>>
>>> Cheers
>>> /Eike
>>>
>>>
>>>
>>> Eike Stepper schrieb:
>>>> Hi,
>>>>
>>>> I'm trying to build several concrete editors that subclass a
>>>> generic base editor. The base editor is generated from a base model
>>>> which is mostly empty, just to have code for an editor generated.
>>>> The derived editors are mostly empty:
>>>>
>>>> |/**
>>>> * @generated NOT
>>>> */
>>>> *public class *ProjectEditor *extends *BaseEditor
>>>> {
>>>> *public *ProjectEditor()
>>>> {
>>>> }
>>>> }|
>>>>
>>>>
>>>> It's very impractical though that in the generated BaseEditor there
>>>> are many references to BaseEditorPlugin.INSTANCE. The derived
>>>> editors would like to override plugin instance used in BaseEditor.
>>>>
>>>> Would it be possible to add an instance field in the generated editor?
>>>> Like this:
>>>>
>>>> | /**
>>>> * @generated
>>>> */
>>>> *protected *EMFPlugin plugin = BaseEditorPlugin.INSTANCE;|
>>>>
>>>>
>>>> Or something similar...
>>>>
>>>> Cheers
>>>> /Eike
>>>>
--------------020105090109000807090301
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ed Merks schrieb:
<blockquote cite="mid:g74kp0$rfr$2@build.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
Eike,<br>
<br>
All these things are possible.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02705 seconds