fix settings handling
for this a common workspace is being created. To allow for multiple instances the work space is being unlocked as soon as the application is initialized
This commit is contained in:
parent
220eaea73c
commit
0e8a757d6e
|
@ -73,7 +73,7 @@ class ToolTipHandler {
|
||||||
Point pt = new Point (event.x, event.y);
|
Point pt = new Point (event.x, event.y);
|
||||||
tipPosition = control.toDisplay(pt);
|
tipPosition = control.toDisplay(pt);
|
||||||
if (tip != null && !tip.isDisposed ()) tip.dispose ();
|
if (tip != null && !tip.isDisposed ()) tip.dispose ();
|
||||||
tip = new Shell (parentShell, SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL);
|
tip = new Shell (parentShell, SWT.NO_FOCUS | SWT.TOOL);
|
||||||
tip.setBackground (display.getSystemColor (SWT.COLOR_INFO_BACKGROUND));
|
tip.setBackground (display.getSystemColor (SWT.COLOR_INFO_BACKGROUND));
|
||||||
GridLayout layout = new GridLayout(1, true);
|
GridLayout layout = new GridLayout(1, true);
|
||||||
layout.verticalSpacing=0;
|
layout.verticalSpacing=0;
|
||||||
|
|
|
@ -11,10 +11,12 @@
|
||||||
package com.minres.scviewer.e4.application;
|
package com.minres.scviewer.e4.application;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
||||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
import org.eclipse.e4.core.contexts.IEclipseContext;
|
||||||
import org.eclipse.e4.core.services.events.IEventBroker;
|
import org.eclipse.e4.core.services.events.IEventBroker;
|
||||||
|
@ -30,6 +32,7 @@ import org.eclipse.e4.ui.workbench.modeling.EModelService;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
|
||||||
import org.eclipse.equinox.app.IApplicationContext;
|
import org.eclipse.equinox.app.IApplicationContext;
|
||||||
|
import org.eclipse.osgi.service.datalocation.Location;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
import org.osgi.service.event.EventHandler;
|
import org.osgi.service.event.EventHandler;
|
||||||
|
|
||||||
|
@ -91,6 +94,20 @@ public class E4LifeCycle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
eventBroker.subscribe(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE, new EventHandler() {
|
||||||
|
@Override
|
||||||
|
public void handleEvent(Event event) {
|
||||||
|
Location instanceLocation = Platform.getInstanceLocation();
|
||||||
|
try {
|
||||||
|
boolean isLocked = instanceLocation.isLocked();
|
||||||
|
if(isLocked)
|
||||||
|
instanceLocation.release();
|
||||||
|
} catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,26 +7,23 @@ import java.util.List;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
||||||
import org.eclipse.e4.core.contexts.Active;
|
import org.eclipse.e4.core.contexts.Active;
|
||||||
import org.eclipse.e4.core.di.annotations.Execute;
|
import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
import org.eclipse.e4.core.di.extensions.Preference;
|
|
||||||
import org.eclipse.e4.ui.model.application.MApplication;
|
import org.eclipse.e4.ui.model.application.MApplication;
|
||||||
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
|
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
|
||||||
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
|
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
|
||||||
import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
|
import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.EModelService;
|
import org.eclipse.e4.ui.workbench.modeling.EModelService;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
|
||||||
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
||||||
|
import com.opcoach.e4.preferences.ScopedPreferenceStore;
|
||||||
|
|
||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class EnableHover {
|
public class EnableHover {
|
||||||
static final String TAG_NAME = "EnableHover"; //$NON-NLS-1$
|
static final String TAG_NAME = "EnableHover"; //$NON-NLS-1$
|
||||||
|
|
||||||
@Inject
|
|
||||||
@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE)
|
|
||||||
IEclipsePreferences prefs;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
MApplication application;
|
MApplication application;
|
||||||
|
|
||||||
|
@ -36,14 +33,17 @@ public class EnableHover {
|
||||||
tags.add(TAG_NAME);
|
tags.add(TAG_NAME);
|
||||||
List<MHandledItem> elements = modelService.findElements(application, null, MHandledItem.class, tags );
|
List<MHandledItem> elements = modelService.findElements(application, null, MHandledItem.class, tags );
|
||||||
// cover initialization stuff, sync it with code
|
// cover initialization stuff, sync it with code
|
||||||
|
IPreferenceStore store = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
|
boolean state = store.getBoolean(PreferenceConstants.SHOW_HOVER);
|
||||||
for( MHandledItem hi : elements ){
|
for( MHandledItem hi : elements ){
|
||||||
hi.setSelected(prefs.getBoolean(PreferenceConstants.SHOW_HOVER, true));
|
hi.setSelected(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Execute
|
@Execute
|
||||||
public void execute(@Active MPart part, @Active MWindow window, MHandledItem handledItem, EModelService modelService ) {
|
public void execute(@Active MPart part, @Active MWindow window, MHandledItem handledItem, EModelService modelService ) {
|
||||||
prefs.putBoolean(PreferenceConstants.SHOW_HOVER, handledItem.isSelected());
|
IPreferenceStore store = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
|
store.setValue(PreferenceConstants.SHOW_HOVER, handledItem.isSelected());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -43,12 +43,9 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
||||||
import org.eclipse.core.runtime.jobs.JobGroup;
|
import org.eclipse.core.runtime.jobs.JobGroup;
|
||||||
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
import org.eclipse.core.runtime.preferences.ConfigurationScope;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
|
||||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
|
||||||
import org.eclipse.e4.core.di.annotations.Optional;
|
import org.eclipse.e4.core.di.annotations.Optional;
|
||||||
import org.eclipse.e4.core.di.extensions.Preference;
|
|
||||||
import org.eclipse.e4.core.services.events.IEventBroker;
|
import org.eclipse.e4.core.services.events.IEventBroker;
|
||||||
import org.eclipse.e4.ui.di.Focus;
|
import org.eclipse.e4.ui.di.Focus;
|
||||||
import org.eclipse.e4.ui.di.PersistState;
|
import org.eclipse.e4.ui.di.PersistState;
|
||||||
|
@ -59,7 +56,9 @@ import org.eclipse.e4.ui.services.EMenuService;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.resource.StringConverter;
|
import org.eclipse.jface.resource.StringConverter;
|
||||||
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
@ -112,8 +111,8 @@ import com.minres.scviewer.e4.application.internal.status.WaveStatusBarControl;
|
||||||
import com.minres.scviewer.e4.application.internal.util.FileMonitor;
|
import com.minres.scviewer.e4.application.internal.util.FileMonitor;
|
||||||
import com.minres.scviewer.e4.application.internal.util.IFileChangeListener;
|
import com.minres.scviewer.e4.application.internal.util.IFileChangeListener;
|
||||||
import com.minres.scviewer.e4.application.internal.util.IModificationChecker;
|
import com.minres.scviewer.e4.application.internal.util.IModificationChecker;
|
||||||
import com.minres.scviewer.e4.application.preferences.DefaultValuesInitializer;
|
|
||||||
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
||||||
|
import com.opcoach.e4.preferences.ScopedPreferenceStore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class WaveformViewerPart.
|
* The Class WaveformViewerPart.
|
||||||
|
@ -195,10 +194,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
@Inject
|
@Inject
|
||||||
EPartService ePartService;
|
EPartService ePartService;
|
||||||
|
|
||||||
/** The prefs. */
|
IPreferenceStore store = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
@Inject
|
|
||||||
@Preference(value = ConfigurationScope.SCOPE, nodePath = PreferenceConstants.PREFERENCES_SCOPE)
|
|
||||||
protected IEclipsePreferences prefs;
|
|
||||||
|
|
||||||
@Inject @Optional DesignBrowser designBrowser;
|
@Inject @Optional DesignBrowser designBrowser;
|
||||||
|
|
||||||
|
@ -353,7 +349,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
|
|
||||||
zoomLevel = waveformPane.getZoomLevels();
|
zoomLevel = waveformPane.getZoomLevels();
|
||||||
setupColors();
|
setupColors();
|
||||||
checkForUpdates = prefs.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
checkForUpdates = store.getBoolean(PreferenceConstants.DATABASE_RELOAD);
|
||||||
filesToLoad = new ArrayList<File>();
|
filesToLoad = new ArrayList<File>();
|
||||||
persistedState = part.getPersistedState();
|
persistedState = part.getPersistedState();
|
||||||
Integer files = persistedState.containsKey(DATABASE_FILE + "S") //$NON-NLS-1$
|
Integer files = persistedState.containsKey(DATABASE_FILE + "S") //$NON-NLS-1$
|
||||||
|
@ -382,7 +378,22 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
prefs.addPreferenceChangeListener(this);
|
store.addPropertyChangeListener(new IPropertyChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) {
|
||||||
|
if (PreferenceConstants.DATABASE_RELOAD.equals(event.getProperty())) {
|
||||||
|
checkForUpdates = (Boolean)event.getNewValue();
|
||||||
|
fileChecker = null;
|
||||||
|
if (checkForUpdates)
|
||||||
|
fileChecker = fileMonitor.addFileChangeListener(WaveformViewer.this, filesToLoad,
|
||||||
|
FILE_CHECK_INTERVAL);
|
||||||
|
else
|
||||||
|
fileMonitor.removeFileChangeListener(WaveformViewer.this);
|
||||||
|
} else if (!PreferenceConstants.SHOW_HOVER.equals(event.getProperty())){
|
||||||
|
setupColors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
waveformPane.addDisposeListener(this);
|
waveformPane.addDisposeListener(this);
|
||||||
|
|
||||||
|
@ -395,7 +406,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
waveformPane.getWaveformControl().setData(Constants.CONTENT_PROVIDER_TAG, new ToolTipContentProvider() {
|
waveformPane.getWaveformControl().setData(Constants.CONTENT_PROVIDER_TAG, new ToolTipContentProvider() {
|
||||||
@Override
|
@Override
|
||||||
public boolean createContent(Composite parent, Point pt) {
|
public boolean createContent(Composite parent, Point pt) {
|
||||||
if(!prefs.getBoolean(PreferenceConstants.SHOW_HOVER, true)) return false;
|
if(!store.getBoolean(PreferenceConstants.SHOW_HOVER)) return false;
|
||||||
List<Object> res = waveformPane.getElementsAt(pt);
|
List<Object> res = waveformPane.getElementsAt(pt);
|
||||||
if(res.size()>0)
|
if(res.size()>0)
|
||||||
if(res.get(0) instanceof ITx) {
|
if(res.get(0) instanceof ITx) {
|
||||||
|
@ -403,9 +414,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
final Display display = parent.getDisplay();
|
final Display display = parent.getDisplay();
|
||||||
final Font font = new Font(Display.getCurrent(), "Terminal", 10, SWT.NORMAL);
|
final Font font = new Font(Display.getCurrent(), "Terminal", 10, SWT.NORMAL);
|
||||||
|
|
||||||
final Label label = new Label(parent, SWT.NONE);
|
final Label label = new Label(parent, SWT.SHADOW_IN);
|
||||||
// label.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
|
label.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
|
||||||
// label.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
|
label.setBackground(display.getSystemColor(SWT.COLOR_GRAY));
|
||||||
label.setText(tx.toString());
|
label.setText(tx.toString());
|
||||||
label.setFont(font);
|
label.setFont(font);
|
||||||
GridData labelGridData = new GridData();
|
GridData labelGridData = new GridData();
|
||||||
|
@ -414,12 +425,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
label.setLayoutData(labelGridData);
|
label.setLayoutData(labelGridData);
|
||||||
|
|
||||||
final Table table = new Table(parent, SWT.NONE);
|
final Table table = new Table(parent, SWT.NONE);
|
||||||
table.setHeaderVisible(true);
|
table.setHeaderVisible(false);
|
||||||
table.setLinesVisible(true);
|
table.setLinesVisible(true);
|
||||||
table.setFont(font);
|
table.setFont(font);
|
||||||
// table.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
|
label.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
|
||||||
// table.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
|
label.setBackground(display.getSystemColor(SWT.COLOR_GRAY));
|
||||||
table.setRedraw(false);
|
|
||||||
GridData tableGridData = new GridData();
|
GridData tableGridData = new GridData();
|
||||||
tableGridData.horizontalAlignment = GridData.FILL;
|
tableGridData.horizontalAlignment = GridData.FILL;
|
||||||
tableGridData.grabExcessHorizontalSpace = true;
|
tableGridData.grabExcessHorizontalSpace = true;
|
||||||
|
@ -441,14 +451,15 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
item.setText(0, iTxAttribute.getName());
|
item.setText(0, iTxAttribute.getName());
|
||||||
item.setText(1, value);
|
item.setText(1, value);
|
||||||
}
|
}
|
||||||
TableItem item = new TableItem(table, SWT.NONE);
|
if(table.getHeaderVisible()) {
|
||||||
item.setText(0, "");
|
// add dummy row to get make last row visible
|
||||||
item.setText(1, "");
|
TableItem item = new TableItem(table, SWT.NONE);
|
||||||
|
item.setText(0, "");
|
||||||
|
item.setText(1, "");
|
||||||
|
}
|
||||||
nameCol.pack();
|
nameCol.pack();
|
||||||
valueCol.pack();
|
valueCol.pack();
|
||||||
table.pack();
|
table.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT));
|
||||||
table.setRedraw(true);
|
|
||||||
|
|
||||||
parent.addPaintListener(new PaintListener() {
|
parent.addPaintListener(new PaintListener() {
|
||||||
@Override
|
@Override
|
||||||
public void paintControl(PaintEvent e) {
|
public void paintControl(PaintEvent e) {
|
||||||
|
@ -462,7 +473,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
return true;
|
return true;
|
||||||
} else if(res.get(0) instanceof TrackEntry) {
|
} else if(res.get(0) instanceof TrackEntry) {
|
||||||
TrackEntry te = (TrackEntry)res.get(0);
|
TrackEntry te = (TrackEntry)res.get(0);
|
||||||
final Display display = parent.getDisplay();
|
|
||||||
final Font font = new Font(Display.getCurrent(), "Terminal", 10, SWT.NORMAL);
|
final Font font = new Font(Display.getCurrent(), "Terminal", 10, SWT.NORMAL);
|
||||||
|
|
||||||
final Label label = new Label(parent, SWT.NONE);
|
final Label label = new Label(parent, SWT.NONE);
|
||||||
|
@ -507,11 +517,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* Setup colors.
|
* Setup colors.
|
||||||
*/
|
*/
|
||||||
protected void setupColors() {
|
protected void setupColors() {
|
||||||
DefaultValuesInitializer initializer = new DefaultValuesInitializer();
|
|
||||||
HashMap<WaveformColors, RGB> colorPref = new HashMap<>();
|
HashMap<WaveformColors, RGB> colorPref = new HashMap<>();
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
String prefValue = prefs.get(c.name() + "_COLOR", //$NON-NLS-1$
|
String prefValue = store.getString(c.name() + "_COLOR"); //$NON-NLS-1$
|
||||||
StringConverter.asString(initializer.colors[c.ordinal()].getRGB()));
|
|
||||||
RGB rgb = StringConverter.asRGB(prefValue);
|
RGB rgb = StringConverter.asRGB(prefValue);
|
||||||
colorPref.put(c, rgb);
|
colorPref.put(c, rgb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,14 @@ package com.minres.scviewer.e4.application.preferences;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
import org.eclipse.core.runtime.preferences.DefaultScope;
|
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.resource.StringConverter;
|
import org.eclipse.jface.resource.StringConverter;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.Color;
|
import org.eclipse.swt.graphics.Color;
|
||||||
import org.eclipse.wb.swt.SWTResourceManager;
|
import org.eclipse.wb.swt.SWTResourceManager;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ui.WaveformColors;
|
import com.minres.scviewer.database.ui.WaveformColors;
|
||||||
|
import com.opcoach.e4.preferences.ScopedPreferenceStore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class DefaultValuesInitializer.
|
* The Class DefaultValuesInitializer.
|
||||||
|
@ -63,22 +64,22 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IEclipsePreferences node = DefaultScope.INSTANCE.getNode(PreferenceConstants.PREFERENCES_SCOPE);
|
// IEclipsePreferences node = DefaultScope.INSTANCE.getNode(PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
if (node != null)
|
// if (node != null)
|
||||||
{
|
// {
|
||||||
node.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
// node.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
node.putBoolean(PreferenceConstants.SHOW_HOVER, true);
|
// node.putBoolean(PreferenceConstants.SHOW_HOVER, true);
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
// for (WaveformColors c : WaveformColors.values()) {
|
||||||
node.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
// node.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
IPreferenceStore store = new ScopedPreferenceStore(DefaultScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
//
|
|
||||||
// store.setDefault(PreferenceConstants.DATABASE_RELOAD, true);
|
store.setDefault(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
// store.setDefault(PreferenceConstants.SHOW_HOVER, true);
|
store.setDefault(PreferenceConstants.SHOW_HOVER, true);
|
||||||
// for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
// store.setDefault(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
store.setDefault(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
<programArgs>-clearPersistedState
|
<programArgs>-clearPersistedState
|
||||||
</programArgs>
|
</programArgs>
|
||||||
<vmArgs>-Xmx2G
|
<vmArgs>-Xmx2G
|
||||||
|
-Dosgi.instance.area=@user.home/.scviewer
|
||||||
|
-Dosgi.instance.area.default=@user.home/.scviewer
|
||||||
</vmArgs>
|
</vmArgs>
|
||||||
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
|
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
|
||||||
</vmArgsMac>
|
</vmArgsMac>
|
||||||
|
@ -18,6 +20,7 @@
|
||||||
|
|
||||||
<windowImages/>
|
<windowImages/>
|
||||||
|
|
||||||
|
|
||||||
<launcher name="scviewer">
|
<launcher name="scviewer">
|
||||||
<linux icon="icons/SCViewer_512x512.xpm"/>
|
<linux icon="icons/SCViewer_512x512.xpm"/>
|
||||||
<macosx icon="icons/SCViewer.icns"/>
|
<macosx icon="icons/SCViewer.icns"/>
|
||||||
|
@ -142,4 +145,11 @@
|
||||||
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
|
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
|
||||||
</configurations>
|
</configurations>
|
||||||
|
|
||||||
|
<preferencesInfo>
|
||||||
|
<targetfile overwrite="false"/>
|
||||||
|
</preferencesInfo>
|
||||||
|
|
||||||
|
<cssInfo>
|
||||||
|
</cssInfo>
|
||||||
|
|
||||||
</product>
|
</product>
|
||||||
|
|
Loading…
Reference in New Issue