Default Grid View for GMF Editor [message #166656] |
Thu, 03 January 2008 10:22 |
Eclipse User |
|
|
|
Originally posted by: marsha.rohrer.swisscom.com
Hi,
I found various links talking about making the grid visible by default.
Among others this one:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg09413.html
My problem is, nothing happens. Here is what I did:
1. Created my own XXXPreferenceInitializer that extends the
DiagramPreferenceInitializer generated by GMF
2. In the Extension page of the plugin.xml of the diagram plugin I added
my custom XXXPreferenceInitializer to the
org.eclipse.core.runtime.preferences
When I go through the code in debug mode the code is executed, but
nevertheless the grid is not vilible on the canvas.
Can anyone tell me what may be the problem?
Thanks a lot.
Marsha
|
|
|
Re: Default Grid View for GMF Editor [message #166805 is a reply to message #166656] |
Fri, 04 January 2008 10:09 |
Eclipse User |
|
|
|
Originally posted by: marsha.rohrer.swisscom.com
Me again,
I also tried to put the custom code in the DiagramPreferencesInitializer
generated by GMF directly. This does not work either.
Anyone an idea why?
My initializeDefaultPreferences() method:
/**
* @generated NOT
*/
public void initializeDefaultPreferences() {
IPreferenceStore store = getPreferenceStore();
DiagramPrintingPreferencePage.initDefaults(store);
DiagramGeneralPreferencePage.initDefaults(store);
DiagramAppearancePreferencePage.initDefaults(store);
DiagramConnectionsPreferencePage.initDefaults(store);
//DiagramRulersAndGridPreferencePage.initDefaults(store);
store.setDefault(IPreferenceConstants.PREF_SHOW_GRID, true);
}
|
|
|
|
Re: Default Grid View for GMF Editor [message #170214 is a reply to message #166946] |
Mon, 28 January 2008 15:14 |
Eclipse User |
|
|
|
Originally posted by: marsha.rohrer.swisscom.com
Hi Cherie,
Thanks for our answer and your hint. But I'm using the same that was
registered with the PreferencesHint. The getPreferenceStore() method is
implemented as follows:
/**
* @generated
*/
protected IPreferenceStore getPreferenceStore() {
return GameDiagramEditorPlugin.getInstance().getPreferenceStore();
}
But still, if I run the plug-in, there is no Grid visible.
Could it be that I have to install the plug-in rather than to start an new
application? This shouldn't be the problem no?
Any other ideas?
Thanks,
Marsha
Cherie Revells wrote:
> Marsha,
> This works fine in the Logic Diagram Example.
> The preference store you are using needs to be the same one that is
> registered with the PreferencesHint class in your Plugin class.
> - Cherie
> Marsha wrote:
>> Me again,
>>
>> I also tried to put the custom code in the DiagramPreferencesInitializer
>> generated by GMF directly. This does not work either.
>>
>> Anyone an idea why?
>>
>> My initializeDefaultPreferences() method:
>> /**
>> * @generated NOT
>> */
>> public void initializeDefaultPreferences() {
>> IPreferenceStore store = getPreferenceStore();
>> DiagramPrintingPreferencePage.initDefaults(store);
>> DiagramGeneralPreferencePage.initDefaults(store);
>> DiagramAppearancePreferencePage.initDefaults(store);
>> DiagramConnectionsPreferencePage.initDefaults(store);
>> //DiagramRulersAndGridPreferencePage.initDefaults(store);
>> store.setDefault(IPreferenceConstants.PREF_SHOW_GRID, true);
>> }
>>
|
|
|
Re: Default Grid View for GMF Editor [message #170380 is a reply to message #170214] |
Tue, 29 January 2008 12:00 |
Eclipse User |
|
|
|
Originally posted by: marsha.rohrer.swisscom.com
Hi,
I found the problem I think.
Before I had the idea to set the grid by default I experimented a bit.
Apperantly these personal changes (personal preferences) are stronger
than the ones set by default.
Once I created a new file with a new editor the grid was visible.
Marsha
|
|
|
Powered by
FUDForum. Page generated in 0.03595 seconds