- small refactoring of part class names
- tried to improve Javadoc
This commit is contained in:
parent
af1b3d00dc
commit
f723a770c7
11
README.md
11
README.md
|
@ -25,8 +25,10 @@ The plugins are structured as follows:
|
||||||
- com.minres.scviewer.feature
|
- com.minres.scviewer.feature
|
||||||
the feature combining the plugins above into a somhow usable form
|
the feature combining the plugins above into a somhow usable form
|
||||||
- scv_tr_sqlite
|
- scv_tr_sqlite
|
||||||
a C++ project containing the SQLite based SCV database implementation. A simple
|
a C++ project containing the SQLite based SCV database implementation and the scv4tlm
|
||||||
example (scv_tr_recording_example.cpp) for testig purposes is provided.
|
socket implementations.
|
||||||
|
A simple example (scv_tr_recording_example.cpp) for testig purposes of the database is
|
||||||
|
provided.
|
||||||
|
|
||||||
To build the plugins the Eclipse SDK or PDE can be used. In both cases the Groovy
|
To build the plugins the Eclipse SDK or PDE can be used. In both cases the Groovy
|
||||||
eclipse plugin (http://groovy.codehaus.org/Eclipse+Plugin or Market) has to be
|
eclipse plugin (http://groovy.codehaus.org/Eclipse+Plugin or Market) has to be
|
||||||
|
@ -34,6 +36,7 @@ installed.
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
- refactor the graphical viewer (again)
|
|
||||||
- add more tests
|
- add more tests
|
||||||
- additional analysis means
|
- move to feature based product to allow automatic updates
|
||||||
|
- improve graphics
|
||||||
|
- catch-up e3 plugin to functionality of e4 product
|
|
@ -12,9 +12,8 @@ package com.minres.scviewer.database.vcd;
|
||||||
|
|
||||||
import com.minres.scviewer.database.BitVector;
|
import com.minres.scviewer.database.BitVector;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* The Interface ITraceBuilder.
|
* The Interface IVCDDatabaseBuilder. It allows to add VCD events into the database
|
||||||
*/
|
*/
|
||||||
public interface IVCDDatabaseBuilder {
|
public interface IVCDDatabaseBuilder {
|
||||||
|
|
||||||
|
|
|
@ -31,15 +31,16 @@ import com.minres.scviewer.database.IWaveformEvent;
|
||||||
import com.minres.scviewer.database.InputFormatException;
|
import com.minres.scviewer.database.InputFormatException;
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* The Class VCDDb.
|
* The Class VCDDb.
|
||||||
*/
|
*/
|
||||||
public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
|
|
||||||
|
|
||||||
|
/** The Constant TIME_RES. */
|
||||||
private static final Long TIME_RES = 1000L; // ps;
|
private static final Long TIME_RES = 1000L; // ps;
|
||||||
|
|
||||||
|
/** The db. */
|
||||||
private IWaveformDb db;
|
private IWaveformDb db;
|
||||||
|
|
||||||
/** The module stack. */
|
/** The module stack. */
|
||||||
|
@ -48,17 +49,17 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
/** The signals. */
|
/** The signals. */
|
||||||
private List<IWaveform<? extends IWaveformEvent>> signals;
|
private List<IWaveform<? extends IWaveformEvent>> signals;
|
||||||
|
|
||||||
|
/** The max time. */
|
||||||
private long maxTime;
|
private long maxTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new VCD db.
|
* Instantiates a new VCD db.
|
||||||
*
|
|
||||||
* @param netName the net name
|
|
||||||
*/
|
*/
|
||||||
public VCDDbLoader() {
|
public VCDDbLoader() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] x = "$date".getBytes();
|
/** The date bytes. */
|
||||||
|
private byte[] dateBytes = "$date".getBytes();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see com.minres.scviewer.database.ITrDb#load(java.io.File)
|
* @see com.minres.scviewer.database.ITrDb#load(java.io.File)
|
||||||
|
@ -68,12 +69,12 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
public boolean load(IWaveformDb db, File file) throws Exception {
|
public boolean load(IWaveformDb db, File file) throws Exception {
|
||||||
this.db=db;
|
this.db=db;
|
||||||
FileInputStream fis = new FileInputStream(file);
|
FileInputStream fis = new FileInputStream(file);
|
||||||
byte[] buffer = new byte[x.length];
|
byte[] buffer = new byte[dateBytes.length];
|
||||||
int read = fis.read(buffer, 0, x.length);
|
int read = fis.read(buffer, 0, dateBytes.length);
|
||||||
fis.close();
|
fis.close();
|
||||||
if (read == x.length)
|
if (read == dateBytes.length)
|
||||||
for (int i = 0; i < x.length; i++)
|
for (int i = 0; i < dateBytes.length; i++)
|
||||||
if (buffer[i] != x[i])
|
if (buffer[i] != dateBytes[i])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
signals = new Vector<IWaveform<? extends IWaveformEvent>>();
|
signals = new Vector<IWaveform<? extends IWaveformEvent>>();
|
||||||
|
@ -180,6 +181,9 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.IWaveformDbLoader#getAllRelationTypes()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Collection<RelationType> getAllRelationTypes(){
|
public Collection<RelationType> getAllRelationTypes(){
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.osgi.service.event.Event;
|
||||||
import org.osgi.service.event.EventHandler;
|
import org.osgi.service.event.EventHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a stub implementation containing e4 LifeCycle annotated methods.<br />
|
* This implementation contains e4 LifeCycle annotated methods.<br />
|
||||||
* There is a corresponding entry in <em>plugin.xml</em> (under the
|
* There is a corresponding entry in <em>plugin.xml</em> (under the
|
||||||
* <em>org.eclipse.core.runtime.products' extension point</em>) that references
|
* <em>org.eclipse.core.runtime.products' extension point</em>) that references
|
||||||
* this class.
|
* this class.
|
||||||
|
@ -42,10 +42,21 @@ import org.osgi.service.event.EventHandler;
|
||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class E4LifeCycle {
|
public class E4LifeCycle {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post construct.
|
||||||
|
*
|
||||||
|
* @param eventBroker the event broker
|
||||||
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
private static void postConstruct(final IEventBroker eventBroker) {
|
private static void postConstruct(final IEventBroker eventBroker) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post context create. Open a database if given on command line using the OpenViewHandler
|
||||||
|
*
|
||||||
|
* @param appContext the app context
|
||||||
|
* @param eventBroker the event broker
|
||||||
|
*/
|
||||||
@PostContextCreate
|
@PostContextCreate
|
||||||
void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) {
|
void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) {
|
||||||
final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS);
|
final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS);
|
||||||
|
@ -66,18 +77,40 @@ public class E4LifeCycle {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pre save.
|
||||||
|
*
|
||||||
|
* @param workbenchContext the workbench context
|
||||||
|
*/
|
||||||
@PreSave
|
@PreSave
|
||||||
void preSave(IEclipseContext workbenchContext) {
|
void preSave(IEclipseContext workbenchContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process additions.
|
||||||
|
*
|
||||||
|
* @param workbenchContext the workbench context
|
||||||
|
*/
|
||||||
@ProcessAdditions
|
@ProcessAdditions
|
||||||
void processAdditions(IEclipseContext workbenchContext) {
|
void processAdditions(IEclipseContext workbenchContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process removals.
|
||||||
|
*
|
||||||
|
* @param workbenchContext the workbench context
|
||||||
|
*/
|
||||||
@ProcessRemovals
|
@ProcessRemovals
|
||||||
void processRemovals(IEclipseContext workbenchContext) {
|
void processRemovals(IEclipseContext workbenchContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join.
|
||||||
|
*
|
||||||
|
* @param tokens the tokens
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
String join(String[] tokens){
|
String join(String[] tokens){
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
boolean first=true;
|
boolean first=true;
|
||||||
|
@ -89,10 +122,25 @@ public class E4LifeCycle {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class OpenViewHandler.
|
||||||
|
*/
|
||||||
private class OpenViewHandler {
|
private class OpenViewHandler {
|
||||||
|
|
||||||
|
/** The app. */
|
||||||
@Inject MApplication app;
|
@Inject MApplication app;
|
||||||
|
|
||||||
|
/** The model service. */
|
||||||
@Inject EModelService modelService;
|
@Inject EModelService modelService;
|
||||||
|
|
||||||
|
/** The part service. */
|
||||||
@Inject EPartService partService;
|
@Inject EPartService partService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open view for file.
|
||||||
|
*
|
||||||
|
* @param name the name
|
||||||
|
*/
|
||||||
public void openViewForFile(String name){
|
public void openViewForFile(String name){
|
||||||
File file = new File(name);
|
File file = new File(name);
|
||||||
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
||||||
|
|
|
@ -27,19 +27,31 @@ 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 com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class NavigateContribution. Currently not used in Application.e4xmi
|
||||||
|
*/
|
||||||
public class NavigateContribution {
|
public class NavigateContribution {
|
||||||
|
|
||||||
|
/** The part service. */
|
||||||
@Inject EPartService partService;
|
@Inject EPartService partService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* About to show.
|
||||||
|
*
|
||||||
|
* @param items the items
|
||||||
|
* @param application the application
|
||||||
|
* @param modelService the model service
|
||||||
|
*/
|
||||||
@AboutToShow
|
@AboutToShow
|
||||||
public void aboutToShow(List<MMenuElement> items, MApplication application, EModelService modelService) {
|
public void aboutToShow(List<MMenuElement> items, MApplication application, EModelService modelService) {
|
||||||
// modelService.getActivePerspective(window)
|
// modelService.getActivePerspective(window)
|
||||||
// modelService.findElements(application,"myID",MPart.class, EModelService.IN_ACTIVE_PERSPECTIVE);
|
// modelService.findElements(application,"myID",MPart.class, EModelService.IN_ACTIVE_PERSPECTIVE);
|
||||||
// MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem();
|
// MDirectMenuItem dynamicItem = MMenuFactory.INSTANCE.createDirectMenuItem();
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
if(part.getObject()instanceof WaveformViewerPart){
|
if(part.getObject()instanceof WaveformViewer){
|
||||||
WaveformViewerPart waveformViewerPart = (WaveformViewerPart) part.getObject();
|
WaveformViewer waveformViewerPart = (WaveformViewer) part.getObject();
|
||||||
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
|
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
|
||||||
MCommand command = modelService.findElements(application,
|
MCommand command = modelService.findElements(application,
|
||||||
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0);
|
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0);
|
||||||
|
|
|
@ -32,24 +32,41 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
import com.minres.scviewer.e4.application.parts.PartListener;
|
import com.minres.scviewer.e4.application.parts.PartListener;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class RelationTypeToolControl allowing to control which TX relation is used for navigation.
|
||||||
|
*/
|
||||||
public class RelationTypeToolControl extends PartListener implements ISelectionChangedListener {
|
public class RelationTypeToolControl extends PartListener implements ISelectionChangedListener {
|
||||||
|
|
||||||
|
/** The part service. */
|
||||||
EPartService partService;
|
EPartService partService;
|
||||||
|
|
||||||
|
/** The combo viewer. */
|
||||||
ComboViewer comboViewer;
|
ComboViewer comboViewer;
|
||||||
|
|
||||||
WaveformViewerPart waveformViewerPart;
|
/** The waveform viewer part. */
|
||||||
|
WaveformViewer waveformViewerPart;
|
||||||
|
|
||||||
|
/** The dummy. */
|
||||||
RelationType dummy = RelationType.create("------------");
|
RelationType dummy = RelationType.create("------------");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new relation type tool control.
|
||||||
|
*
|
||||||
|
* @param partService the part service
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public RelationTypeToolControl(EPartService partService) {
|
public RelationTypeToolControl(EPartService partService) {
|
||||||
this.partService=partService;
|
this.partService=partService;
|
||||||
partService.addPartListener(this);
|
partService.addPartListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the gui.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void createGui(Composite parent) {
|
public void createGui(Composite parent) {
|
||||||
comboViewer = new ComboViewer(parent, SWT.NONE);
|
comboViewer = new ComboViewer(parent, SWT.NONE);
|
||||||
|
@ -62,10 +79,13 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||||
comboViewer.addSelectionChangedListener(this);
|
comboViewer.addSelectionChangedListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.e4.application.parts.PartListener#partActivated(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partActivated(MPart part) {
|
public void partActivated(MPart part) {
|
||||||
if(part.getObject() instanceof WaveformViewerPart){
|
if(part.getObject() instanceof WaveformViewer){
|
||||||
waveformViewerPart=(WaveformViewerPart) part.getObject();
|
waveformViewerPart=(WaveformViewer) part.getObject();
|
||||||
checkSelection(waveformViewerPart.getSelection());
|
checkSelection(waveformViewerPart.getSelection());
|
||||||
} else {
|
} else {
|
||||||
waveformViewerPart=null;
|
waveformViewerPart=null;
|
||||||
|
@ -73,14 +93,25 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selection.
|
||||||
|
*
|
||||||
|
* @param selection the selection
|
||||||
|
* @param partService the part service
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){
|
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
if(part!=null && part.getObject() instanceof WaveformViewerPart && comboViewer!=null){
|
if(part!=null && part.getObject() instanceof WaveformViewer && comboViewer!=null){
|
||||||
checkSelection(selection);
|
checkSelection(selection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check selection.
|
||||||
|
*
|
||||||
|
* @param selection the selection
|
||||||
|
*/
|
||||||
protected void checkSelection(ISelection selection) {
|
protected void checkSelection(ISelection selection) {
|
||||||
if( selection instanceof IStructuredSelection) {
|
if( selection instanceof IStructuredSelection) {
|
||||||
Object object= ((IStructuredSelection)selection).getFirstElement();
|
Object object= ((IStructuredSelection)selection).getFirstElement();
|
||||||
|
@ -94,11 +125,14 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||||
comboViewer.getCombo().setEnabled(false);
|
comboViewer.getCombo().setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
if(part!=null && part.getObject() instanceof WaveformViewerPart && !event.getSelection().isEmpty()){
|
if(part!=null && part.getObject() instanceof WaveformViewer && !event.getSelection().isEmpty()){
|
||||||
WaveformViewerPart waveformViewerPart=(WaveformViewerPart) part.getObject();
|
WaveformViewer waveformViewerPart=(WaveformViewer) part.getObject();
|
||||||
if(event.getSelection() instanceof IStructuredSelection){
|
if(event.getSelection() instanceof IStructuredSelection){
|
||||||
waveformViewerPart.setNavigationRelationType(
|
waveformViewerPart.setNavigationRelationType(
|
||||||
(RelationType)((IStructuredSelection)event.getSelection()).getFirstElement());
|
(RelationType)((IStructuredSelection)event.getSelection()).getFirstElement());
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class DeleteWaveformHandler {
|
public class DeleteWaveformHandler {
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ public class DeleteWaveformHandler {
|
||||||
public void execute(ESelectionService selectionService, MPart activePart) {
|
public void execute(ESelectionService selectionService, MPart activePart) {
|
||||||
Object o = activePart.getObject();
|
Object o = activePart.getObject();
|
||||||
Object sel = selectionService.getSelection();
|
Object sel = selectionService.getSelection();
|
||||||
if(o instanceof WaveformViewerPart && ((IStructuredSelection)sel).getFirstElement() instanceof IWaveform<?>){
|
if(o instanceof WaveformViewer && ((IStructuredSelection)sel).getFirstElement() instanceof IWaveform<?>){
|
||||||
((WaveformViewerPart)o).removeStreamFromList((IWaveform<?>) ((IStructuredSelection)sel).getFirstElement());
|
((WaveformViewer)o).removeStreamFromList((IWaveform<?>) ((IStructuredSelection)sel).getFirstElement());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class MoveWaveformHandler {
|
public class MoveWaveformHandler {
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ public class MoveWaveformHandler {
|
||||||
public void execute(@Named(PARAMETER_ID) String param, EPartService partService) {
|
public void execute(@Named(PARAMETER_ID) String param, EPartService partService) {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewerPart){
|
if(obj instanceof WaveformViewer){
|
||||||
if("up".equalsIgnoreCase(param))
|
if("up".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveSelected(-1);
|
((WaveformViewer)obj).moveSelected(-1);
|
||||||
else if("down".equalsIgnoreCase(param))
|
else if("down".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveSelected(1);
|
((WaveformViewer)obj).moveSelected(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.ui.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class NavigateEvent {
|
public class NavigateEvent {
|
||||||
|
|
||||||
|
@ -45,11 +45,11 @@ public class NavigateEvent {
|
||||||
// String param="next";
|
// String param="next";
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewerPart){
|
if(obj instanceof WaveformViewer){
|
||||||
if("next".equalsIgnoreCase(param))
|
if("next".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveCursor(GotoDirection.NEXT);
|
((WaveformViewer)obj).moveCursor(GotoDirection.NEXT);
|
||||||
else if("prev".equalsIgnoreCase(param))
|
else if("prev".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveCursor(GotoDirection.PREV);
|
((WaveformViewer)obj).moveCursor(GotoDirection.PREV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.ui.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class NavigateTrans {
|
public class NavigateTrans {
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ public class NavigateTrans {
|
||||||
public void execute(@Named(PARAMTER_ID) String param, EPartService partService) {
|
public void execute(@Named(PARAMTER_ID) String param, EPartService partService) {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewerPart){
|
if(obj instanceof WaveformViewer){
|
||||||
if("next".equalsIgnoreCase(param))
|
if("next".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveSelection(GotoDirection.NEXT);
|
((WaveformViewer)obj).moveSelection(GotoDirection.NEXT);
|
||||||
else if("prev".equalsIgnoreCase(param))
|
else if("prev".equalsIgnoreCase(param))
|
||||||
((WaveformViewerPart)obj).moveSelection(GotoDirection.PREV);
|
((WaveformViewer)obj).moveSelection(GotoDirection.PREV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@ import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
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.workbench.modeling.EPartService;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
|
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class SetRelationTypeHandler {
|
public class SetRelationTypeHandler {
|
||||||
final static String PARAMTER_ID="com.minres.scviewer.e4.application.commandparameter.relationName";
|
final static String PARAMTER_ID="com.minres.scviewer.e4.application.commandparameter.relationName";
|
||||||
|
@ -26,8 +26,8 @@ public class SetRelationTypeHandler {
|
||||||
public void execute(@Named(PARAMTER_ID) String relationName, EPartService partService) {
|
public void execute(@Named(PARAMTER_ID) String relationName, EPartService partService) {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewerPart){
|
if(obj instanceof WaveformViewer){
|
||||||
WaveformViewerPart waveformViewerPart = (WaveformViewerPart) obj;
|
WaveformViewer waveformViewerPart = (WaveformViewer) obj;
|
||||||
waveformViewerPart.setNavigationRelationType(relationName);
|
waveformViewerPart.setNavigationRelationType(relationName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
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.workbench.modeling.EPartService;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
|
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class ZoomHandler {
|
public class ZoomHandler {
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ public class ZoomHandler {
|
||||||
public void execute(@Named(PARAMTER_ID) String level, EPartService partService) {
|
public void execute(@Named(PARAMTER_ID) String level, EPartService partService) {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewerPart){
|
if(obj instanceof WaveformViewer){
|
||||||
WaveformViewerPart waveformViewerPart = (WaveformViewerPart) obj;
|
WaveformViewer waveformViewerPart = (WaveformViewer) obj;
|
||||||
int zoomLevel = waveformViewerPart.getZoomLevel();
|
int zoomLevel = waveformViewerPart.getZoomLevel();
|
||||||
if("in".equalsIgnoreCase(level))
|
if("in".equalsIgnoreCase(level))
|
||||||
waveformViewerPart.setZoomLevel(zoomLevel-1);
|
waveformViewerPart.setZoomLevel(zoomLevel-1);
|
||||||
|
|
|
@ -38,35 +38,75 @@ import org.osgi.service.prefs.Preferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Heap Status control, which shows the heap usage statistics in the window trim.
|
* The Heap Status control, which shows the heap usage statistics in the window trim.
|
||||||
*
|
* Part of the code is taken from the eclipse internal implementation
|
||||||
* @since 3.1
|
|
||||||
*/
|
*/
|
||||||
public class HeapStatus extends Composite {
|
public class HeapStatus extends Composite {
|
||||||
|
|
||||||
|
/** The armed. */
|
||||||
private boolean armed;
|
private boolean armed;
|
||||||
|
|
||||||
|
/** The gc image. */
|
||||||
private Image gcImage;
|
private Image gcImage;
|
||||||
|
|
||||||
|
/** The disabled gc image. */
|
||||||
private Image disabledGcImage;
|
private Image disabledGcImage;
|
||||||
|
|
||||||
|
/** The arm col. */
|
||||||
private Color bgCol, usedMemCol, lowMemCol, freeMemCol, topLeftCol, bottomRightCol, sepCol, textCol, markCol, armCol;
|
private Color bgCol, usedMemCol, lowMemCol, freeMemCol, topLeftCol, bottomRightCol, sepCol, textCol, markCol, armCol;
|
||||||
|
|
||||||
|
/** The button. */
|
||||||
private Canvas button;
|
private Canvas button;
|
||||||
|
|
||||||
|
/** The preferences. */
|
||||||
private Preferences preferences;
|
private Preferences preferences;
|
||||||
|
|
||||||
|
/** The update interval. */
|
||||||
private int updateInterval;
|
private int updateInterval;
|
||||||
|
|
||||||
|
/** The show max. */
|
||||||
private boolean showMax;
|
private boolean showMax;
|
||||||
|
|
||||||
|
/** The total mem. */
|
||||||
private long totalMem;
|
private long totalMem;
|
||||||
|
|
||||||
|
/** The prev total mem. */
|
||||||
private long prevTotalMem = -1L;
|
private long prevTotalMem = -1L;
|
||||||
|
|
||||||
|
/** The prev used mem. */
|
||||||
private long prevUsedMem = -1L;
|
private long prevUsedMem = -1L;
|
||||||
|
|
||||||
|
/** The has changed. */
|
||||||
private boolean hasChanged;
|
private boolean hasChanged;
|
||||||
|
|
||||||
|
/** The used mem. */
|
||||||
private long usedMem;
|
private long usedMem;
|
||||||
|
|
||||||
|
/** The mark. */
|
||||||
private long mark = -1;
|
private long mark = -1;
|
||||||
|
|
||||||
|
/** The img bounds. */
|
||||||
// start with 12x12
|
// start with 12x12
|
||||||
private Rectangle imgBounds = new Rectangle(0,0,12,12);
|
private Rectangle imgBounds = new Rectangle(0,0,12,12);
|
||||||
|
|
||||||
|
/** The max mem. */
|
||||||
private long maxMem = Long.MAX_VALUE;
|
private long maxMem = Long.MAX_VALUE;
|
||||||
|
|
||||||
|
/** The max mem known. */
|
||||||
private boolean maxMemKnown;
|
private boolean maxMemKnown;
|
||||||
|
|
||||||
|
/** The low mem threshold. */
|
||||||
private float lowMemThreshold = 0.05f;
|
private float lowMemThreshold = 0.05f;
|
||||||
|
|
||||||
|
/** The show low mem threshold. */
|
||||||
private boolean showLowMemThreshold = true;
|
private boolean showLowMemThreshold = true;
|
||||||
|
|
||||||
|
/** The update tooltip. */
|
||||||
private boolean updateTooltip = false;
|
private boolean updateTooltip = false;
|
||||||
|
|
||||||
|
/** The is in gc. */
|
||||||
protected volatile boolean isInGC = false;
|
protected volatile boolean isInGC = false;
|
||||||
|
|
||||||
|
/** The timer. */
|
||||||
private final Runnable timer = new Runnable() {
|
private final Runnable timer = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -84,6 +124,7 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** The pref listener. */
|
||||||
private final IPreferenceChangeListener prefListener = new IPreferenceChangeListener() {
|
private final IPreferenceChangeListener prefListener = new IPreferenceChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void preferenceChange(PreferenceChangeEvent event) {
|
public void preferenceChange(PreferenceChangeEvent event) {
|
||||||
|
@ -215,6 +256,9 @@ public class HeapStatus extends Composite {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics.Color)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setBackground(Color color) {
|
public void setBackground(Color color) {
|
||||||
bgCol = color;
|
bgCol = color;
|
||||||
|
@ -222,6 +266,9 @@ public class HeapStatus extends Composite {
|
||||||
button.update();
|
button.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.swt.widgets.Control#setForeground(org.eclipse.swt.graphics.Color)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setForeground(Color color) {
|
public void setForeground(Color color) {
|
||||||
if (color == null) {
|
if (color == null) {
|
||||||
|
@ -234,6 +281,9 @@ public class HeapStatus extends Composite {
|
||||||
button.update();
|
button.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.swt.widgets.Control#getForeground()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Color getForeground() {
|
public Color getForeground() {
|
||||||
if (usedMemCol != null) {
|
if (usedMemCol != null) {
|
||||||
|
@ -244,6 +294,8 @@ public class HeapStatus extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum memory limit, or Long.MAX_VALUE if the max is not known.
|
* Returns the maximum memory limit, or Long.MAX_VALUE if the max is not known.
|
||||||
|
*
|
||||||
|
* @return the max mem
|
||||||
*/
|
*/
|
||||||
private long getMaxMem() {
|
private long getMaxMem() {
|
||||||
long max = Long.MAX_VALUE;
|
long max = Long.MAX_VALUE;
|
||||||
|
@ -261,10 +313,18 @@ public class HeapStatus extends Composite {
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the update interval in ms.
|
||||||
|
*
|
||||||
|
* @param interval the new update interval in ms
|
||||||
|
*/
|
||||||
private void setUpdateIntervalInMS(int interval) {
|
private void setUpdateIntervalInMS(int interval) {
|
||||||
updateInterval = Math.max(100, interval);
|
updateInterval = Math.max(100, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do dispose.
|
||||||
|
*/
|
||||||
private void doDispose() {
|
private void doDispose() {
|
||||||
if(preferences instanceof IEclipsePreferences)
|
if(preferences instanceof IEclipsePreferences)
|
||||||
((IEclipsePreferences)preferences).removePreferenceChangeListener(prefListener);
|
((IEclipsePreferences)preferences).removePreferenceChangeListener(prefListener);
|
||||||
|
@ -276,6 +336,9 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Point computeSize(int wHint, int hHint, boolean changed) {
|
public Point computeSize(int wHint, int hHint, boolean changed) {
|
||||||
GC gc = new GC(this);
|
GC gc = new GC(this);
|
||||||
|
@ -291,6 +354,11 @@ public class HeapStatus extends Composite {
|
||||||
return new Point(p.x + 15, height);
|
return new Point(p.x + 15, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Arm.
|
||||||
|
*
|
||||||
|
* @param armed the armed
|
||||||
|
*/
|
||||||
private void arm(boolean armed) {
|
private void arm(boolean armed) {
|
||||||
if (this.armed == armed) {
|
if (this.armed == armed) {
|
||||||
return;
|
return;
|
||||||
|
@ -300,6 +368,11 @@ public class HeapStatus extends Composite {
|
||||||
button.update();
|
button.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gc running.
|
||||||
|
*
|
||||||
|
* @param isInGC the is in gc
|
||||||
|
*/
|
||||||
private void gcRunning(boolean isInGC) {
|
private void gcRunning(boolean isInGC) {
|
||||||
if (this.isInGC == isInGC) {
|
if (this.isInGC == isInGC) {
|
||||||
return;
|
return;
|
||||||
|
@ -310,7 +383,7 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the context menu
|
* Creates the context menu.
|
||||||
*/
|
*/
|
||||||
private void createContextMenu() {
|
private void createContextMenu() {
|
||||||
MenuManager menuMgr = new MenuManager();
|
MenuManager menuMgr = new MenuManager();
|
||||||
|
@ -325,6 +398,11 @@ public class HeapStatus extends Composite {
|
||||||
setMenu(menu);
|
setMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fill menu.
|
||||||
|
*
|
||||||
|
* @param menuMgr the menu mgr
|
||||||
|
*/
|
||||||
private void fillMenu(IMenuManager menuMgr) {
|
private void fillMenu(IMenuManager menuMgr) {
|
||||||
menuMgr.add(new SetMarkAction());
|
menuMgr.add(new SetMarkAction());
|
||||||
menuMgr.add(new ClearMarkAction());
|
menuMgr.add(new ClearMarkAction());
|
||||||
|
@ -354,6 +432,9 @@ public class HeapStatus extends Composite {
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gc.
|
||||||
|
*/
|
||||||
private void gc() {
|
private void gc() {
|
||||||
gcRunning(true);
|
gcRunning(true);
|
||||||
Thread t = new Thread() {
|
Thread t = new Thread() {
|
||||||
|
@ -373,6 +454,9 @@ public class HeapStatus extends Composite {
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Busy gc.
|
||||||
|
*/
|
||||||
private void busyGC() {
|
private void busyGC() {
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
System.gc();
|
System.gc();
|
||||||
|
@ -380,6 +464,11 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint button.
|
||||||
|
*
|
||||||
|
* @param gc the gc
|
||||||
|
*/
|
||||||
private void paintButton(GC gc) {
|
private void paintButton(GC gc) {
|
||||||
Rectangle rect = button.getClientArea();
|
Rectangle rect = button.getClientArea();
|
||||||
if (isInGC) {
|
if (isInGC) {
|
||||||
|
@ -399,6 +488,11 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint composite.
|
||||||
|
*
|
||||||
|
* @param gc the gc
|
||||||
|
*/
|
||||||
private void paintComposite(GC gc) {
|
private void paintComposite(GC gc) {
|
||||||
if (showMax && maxMemKnown) {
|
if (showMax && maxMemKnown) {
|
||||||
paintCompositeMaxKnown(gc);
|
paintCompositeMaxKnown(gc);
|
||||||
|
@ -407,6 +501,11 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint composite max unknown.
|
||||||
|
*
|
||||||
|
* @param gc the gc
|
||||||
|
*/
|
||||||
private void paintCompositeMaxUnknown(GC gc) {
|
private void paintCompositeMaxUnknown(GC gc) {
|
||||||
Rectangle rect = getClientArea();
|
Rectangle rect = getClientArea();
|
||||||
int x = rect.x;
|
int x = rect.x;
|
||||||
|
@ -449,6 +548,11 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint composite max known.
|
||||||
|
*
|
||||||
|
* @param gc the gc
|
||||||
|
*/
|
||||||
private void paintCompositeMaxKnown(GC gc) {
|
private void paintCompositeMaxKnown(GC gc) {
|
||||||
Rectangle rect = getClientArea();
|
Rectangle rect = getClientArea();
|
||||||
int x = rect.x;
|
int x = rect.x;
|
||||||
|
@ -509,6 +613,14 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paint mark.
|
||||||
|
*
|
||||||
|
* @param gc the gc
|
||||||
|
* @param x the x
|
||||||
|
* @param y the y
|
||||||
|
* @param h the h
|
||||||
|
*/
|
||||||
private void paintMark(GC gc, int x, int y, int h) {
|
private void paintMark(GC gc, int x, int y, int h) {
|
||||||
gc.setForeground(markCol);
|
gc.setForeground(markCol);
|
||||||
gc.drawLine(x, y+1, x, y+h-2);
|
gc.drawLine(x, y+1, x, y+h-2);
|
||||||
|
@ -516,6 +628,9 @@ public class HeapStatus extends Composite {
|
||||||
gc.drawLine(x-1, y+h-2, x+1, y+h-2);
|
gc.drawLine(x-1, y+h-2, x+1, y+h-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update stats.
|
||||||
|
*/
|
||||||
private void updateStats() {
|
private void updateStats() {
|
||||||
Runtime runtime = Runtime.getRuntime();
|
Runtime runtime = Runtime.getRuntime();
|
||||||
totalMem = runtime.totalMemory();
|
totalMem = runtime.totalMemory();
|
||||||
|
@ -533,6 +648,9 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool tip.
|
||||||
|
*/
|
||||||
private void updateToolTip() {
|
private void updateToolTip() {
|
||||||
String usedStr = convertToMegString(usedMem);
|
String usedStr = convertToMegString(usedMem);
|
||||||
String totalStr = convertToMegString(totalMem);
|
String totalStr = convertToMegString(totalMem);
|
||||||
|
@ -546,6 +664,9 @@ public class HeapStatus extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the given number of bytes to a printable number of megabytes (rounded up).
|
* Converts the given number of bytes to a printable number of megabytes (rounded up).
|
||||||
|
*
|
||||||
|
* @param numBytes the num bytes
|
||||||
|
* @return the string
|
||||||
*/
|
*/
|
||||||
private String convertToMegString(long numBytes) {
|
private String convertToMegString(long numBytes) {
|
||||||
return new Long(convertToMeg(numBytes)).toString()+"M";
|
return new Long(convertToMeg(numBytes)).toString()+"M";
|
||||||
|
@ -553,41 +674,74 @@ public class HeapStatus extends Composite {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the given number of bytes to the corresponding number of megabytes (rounded up).
|
* Converts the given number of bytes to the corresponding number of megabytes (rounded up).
|
||||||
|
*
|
||||||
|
* @param numBytes the num bytes
|
||||||
|
* @return the long
|
||||||
*/
|
*/
|
||||||
private long convertToMeg(long numBytes) {
|
private long convertToMeg(long numBytes) {
|
||||||
return (numBytes + (512 * 1024)) / (1024 * 1024);
|
return (numBytes + (512 * 1024)) / (1024 * 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class SetMarkAction.
|
||||||
|
*/
|
||||||
class SetMarkAction extends Action {
|
class SetMarkAction extends Action {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new sets the mark action.
|
||||||
|
*/
|
||||||
SetMarkAction() {
|
SetMarkAction() {
|
||||||
super("&Set Mark");
|
super("&Set Mark");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.Action#run()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
setMark();
|
setMark();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ClearMarkAction.
|
||||||
|
*/
|
||||||
class ClearMarkAction extends Action {
|
class ClearMarkAction extends Action {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new clear mark action.
|
||||||
|
*/
|
||||||
ClearMarkAction() {
|
ClearMarkAction() {
|
||||||
super("&Clear Mark");
|
super("&Clear Mark");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.Action#run()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
clearMark();
|
clearMark();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ShowMaxAction.
|
||||||
|
*/
|
||||||
class ShowMaxAction extends Action {
|
class ShowMaxAction extends Action {
|
||||||
ShowMaxAction() {
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new show max action.
|
||||||
|
*/
|
||||||
|
ShowMaxAction() {
|
||||||
super("Show &Max Heap", IAction.AS_CHECK_BOX);
|
super("Show &Max Heap", IAction.AS_CHECK_BOX);
|
||||||
setEnabled(maxMemKnown);
|
setEnabled(maxMemKnown);
|
||||||
setChecked(showMax);
|
setChecked(showMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.Action#run()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
preferences.putBoolean(IHeapStatusConstants.PREF_SHOW_MAX, isChecked());
|
preferences.putBoolean(IHeapStatusConstants.PREF_SHOW_MAX, isChecked());
|
||||||
|
@ -595,13 +749,22 @@ public class HeapStatus extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class CloseHeapStatusAction.
|
||||||
|
*/
|
||||||
class CloseHeapStatusAction extends Action{
|
class CloseHeapStatusAction extends Action{
|
||||||
|
|
||||||
CloseHeapStatusAction(){
|
/**
|
||||||
|
* Instantiates a new close heap status action.
|
||||||
|
*/
|
||||||
|
CloseHeapStatusAction(){
|
||||||
super("&Close");
|
super("&Close");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.Action#run()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void run(){
|
public void run(){
|
||||||
// WorkbenchWindow wbw = (WorkbenchWindow) PlatformUI.getWorkbench()
|
// WorkbenchWindow wbw = (WorkbenchWindow) PlatformUI.getWorkbench()
|
||||||
// .getActiveWorkbenchWindow();
|
// .getActiveWorkbenchWindow();
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
package com.minres.scviewer.e4.application.internal.status;
|
package com.minres.scviewer.e4.application.internal.status;
|
||||||
/**
|
/**
|
||||||
* Preference constants for the heap status.
|
* Preference constants for the heap status.
|
||||||
*
|
|
||||||
* @since 3.1
|
|
||||||
*/
|
*/
|
||||||
public interface IHeapStatusConstants {
|
public interface IHeapStatusConstants {
|
||||||
|
|
||||||
|
|
|
@ -32,21 +32,37 @@ import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.ProgressBar;
|
import org.eclipse.swt.widgets.ProgressBar;
|
||||||
import org.osgi.service.prefs.PreferencesService;
|
import org.osgi.service.prefs.PreferencesService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class StatusBarControl.
|
||||||
|
*/
|
||||||
public class StatusBarControl {
|
public class StatusBarControl {
|
||||||
|
|
||||||
|
/** The Constant STATUS_UPDATE. */
|
||||||
public static final String STATUS_UPDATE="StatusUpdate";
|
public static final String STATUS_UPDATE="StatusUpdate";
|
||||||
|
|
||||||
|
/** The model service. */
|
||||||
@Inject EModelService modelService;
|
@Inject EModelService modelService;
|
||||||
|
|
||||||
|
/** The osgi preverences. */
|
||||||
@Inject @Optional PreferencesService osgiPreverences;
|
@Inject @Optional PreferencesService osgiPreverences;
|
||||||
|
|
||||||
|
/** The sync. */
|
||||||
private final UISynchronize sync;
|
private final UISynchronize sync;
|
||||||
|
|
||||||
|
/** The manager. */
|
||||||
protected StatusLineManager manager;
|
protected StatusLineManager manager;
|
||||||
|
|
||||||
|
/** The monitor. */
|
||||||
private SyncedProgressMonitor monitor;
|
private SyncedProgressMonitor monitor;
|
||||||
|
|
||||||
|
/** The progress bar. */
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new status bar control.
|
||||||
|
*
|
||||||
|
* @param sync the sync
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public StatusBarControl(UISynchronize sync) {
|
public StatusBarControl(UISynchronize sync) {
|
||||||
this.sync=sync;
|
this.sync=sync;
|
||||||
|
@ -54,6 +70,12 @@ public class StatusBarControl {
|
||||||
manager.update(true);
|
manager.update(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the widget.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
* @param toolControl the tool control
|
||||||
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
void createWidget(Composite parent, MToolControl toolControl) {
|
void createWidget(Composite parent, MToolControl toolControl) {
|
||||||
if (toolControl.getElementId().equals("org.eclipse.ui.StatusLine")) { //$NON-NLS-1$
|
if (toolControl.getElementId().equals("org.eclipse.ui.StatusLine")) { //$NON-NLS-1$
|
||||||
|
@ -65,6 +87,9 @@ public class StatusBarControl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy.
|
||||||
|
*/
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
void destroy() {
|
void destroy() {
|
||||||
if (manager != null) {
|
if (manager != null) {
|
||||||
|
@ -74,8 +99,10 @@ public class StatusBarControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parent
|
* Creates the progress bar.
|
||||||
* @param toolControl
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
* @param toolControl the tool control
|
||||||
*/
|
*/
|
||||||
private void createProgressBar(Composite parent, MToolControl toolControl) {
|
private void createProgressBar(Composite parent, MToolControl toolControl) {
|
||||||
new Label(parent, SWT.NONE);
|
new Label(parent, SWT.NONE);
|
||||||
|
@ -92,22 +119,32 @@ public class StatusBarControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parent
|
* Creates the heap status.
|
||||||
* @param toolControl
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
* @param toolControl the tool control
|
||||||
*/
|
*/
|
||||||
private void createHeapStatus(Composite parent, MToolControl toolControl) {
|
private void createHeapStatus(Composite parent, MToolControl toolControl) {
|
||||||
new HeapStatus(parent, osgiPreverences.getSystemPreferences());
|
new HeapStatus(parent, osgiPreverences.getSystemPreferences());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parent
|
* Creates the status line.
|
||||||
* @param toolControl
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
* @param toolControl the tool control
|
||||||
*/
|
*/
|
||||||
private void createStatusLine(Composite parent, MToolControl toolControl) {
|
private void createStatusLine(Composite parent, MToolControl toolControl) {
|
||||||
// IEclipseContext context = modelService.getContainingContext(toolControl);
|
// IEclipseContext context = modelService.getContainingContext(toolControl);
|
||||||
manager.createControl(parent);
|
manager.createControl(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the status event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @return the status event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getStatusEvent(@UIEventTopic(STATUS_UPDATE) String text) {
|
public void getStatusEvent(@UIEventTopic(STATUS_UPDATE) String text) {
|
||||||
if(manager!=null ){
|
if(manager!=null ){
|
||||||
|
@ -115,13 +152,24 @@ public class StatusBarControl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class SyncedProgressMonitor.
|
||||||
|
*/
|
||||||
private final class SyncedProgressMonitor extends NullProgressMonitor {
|
private final class SyncedProgressMonitor extends NullProgressMonitor {
|
||||||
|
|
||||||
// thread-Safe via thread confinement of the UI-Thread
|
// thread-Safe via thread confinement of the UI-Thread
|
||||||
|
/** The running tasks. */
|
||||||
// (means access only via UI-Thread)
|
// (means access only via UI-Thread)
|
||||||
private long runningTasks = 0L;
|
private long runningTasks = 0L;
|
||||||
|
|
||||||
|
/** The progress bar. */
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new synced progress monitor.
|
||||||
|
*
|
||||||
|
* @param progressBar the progress bar
|
||||||
|
*/
|
||||||
public SyncedProgressMonitor(ProgressBar progressBar) {
|
public SyncedProgressMonitor(ProgressBar progressBar) {
|
||||||
super();
|
super();
|
||||||
this.progressBar = progressBar;
|
this.progressBar = progressBar;
|
||||||
|
@ -130,6 +178,9 @@ public class StatusBarControl {
|
||||||
progressBar.setEnabled(false);
|
progressBar.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.NullProgressMonitor#beginTask(java.lang.String, int)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void beginTask(final String name, final int totalWork) {
|
public void beginTask(final String name, final int totalWork) {
|
||||||
sync.syncExec(new Runnable() {
|
sync.syncExec(new Runnable() {
|
||||||
|
@ -148,6 +199,9 @@ public class StatusBarControl {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.NullProgressMonitor#worked(int)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void worked(final int work) {
|
public void worked(final int work) {
|
||||||
sync.syncExec(new Runnable() {
|
sync.syncExec(new Runnable() {
|
||||||
|
@ -158,6 +212,9 @@ public class StatusBarControl {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.NullProgressMonitor#done()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
sync.syncExec(new Runnable() {
|
sync.syncExec(new Runnable() {
|
||||||
|
@ -169,6 +226,13 @@ public class StatusBarControl {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the job.
|
||||||
|
*
|
||||||
|
* @param job the job
|
||||||
|
* @return the i progress monitor
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
@Override
|
@Override
|
||||||
public boolean isCanceled() {
|
public boolean isCanceled() {
|
||||||
|
|
|
@ -24,8 +24,6 @@ import org.eclipse.swt.widgets.ToolItem;
|
||||||
/**
|
/**
|
||||||
* Simple class to provide some common internal Trim support.
|
* Simple class to provide some common internal Trim support.
|
||||||
*
|
*
|
||||||
* @since 3.2
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class TrimUtil {
|
public class TrimUtil {
|
||||||
|
|
||||||
|
|
|
@ -27,23 +27,50 @@ import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class WaveStatusBarControl.
|
||||||
|
*/
|
||||||
public class WaveStatusBarControl extends StatusBarControl {
|
public class WaveStatusBarControl extends StatusBarControl {
|
||||||
|
|
||||||
|
/** The Constant ZOOM_LEVEL. */
|
||||||
public static final String ZOOM_LEVEL="ZoomLevelUpdate";
|
public static final String ZOOM_LEVEL="ZoomLevelUpdate";
|
||||||
|
|
||||||
|
/** The Constant CURSOR_TIME. */
|
||||||
public static final String CURSOR_TIME="CursorPosUpdate";
|
public static final String CURSOR_TIME="CursorPosUpdate";
|
||||||
|
|
||||||
|
/** The Constant MARKER_TIME. */
|
||||||
public static final String MARKER_TIME="MarkerPosUpdate";
|
public static final String MARKER_TIME="MarkerPosUpdate";
|
||||||
|
|
||||||
|
/** The Constant MARKER_DIFF. */
|
||||||
public static final String MARKER_DIFF="MarlerDiffUpdate";
|
public static final String MARKER_DIFF="MarlerDiffUpdate";
|
||||||
|
|
||||||
|
/** The model service. */
|
||||||
@Inject
|
@Inject
|
||||||
EModelService modelService;
|
EModelService modelService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TextContributionItem.
|
||||||
|
*/
|
||||||
class TextContributionItem extends ContributionItem {
|
class TextContributionItem extends ContributionItem {
|
||||||
|
|
||||||
|
/** The label string. */
|
||||||
final String labelString;
|
final String labelString;
|
||||||
|
|
||||||
|
/** The width. */
|
||||||
final int width;
|
final int width;
|
||||||
|
|
||||||
|
/** The text. */
|
||||||
CLabel label, text;
|
CLabel label, text;
|
||||||
|
|
||||||
|
/** The content. */
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new text contribution item.
|
||||||
|
*
|
||||||
|
* @param labelString the label string
|
||||||
|
* @param width the width
|
||||||
|
*/
|
||||||
public TextContributionItem(String labelString, int width) {
|
public TextContributionItem(String labelString, int width) {
|
||||||
super();
|
super();
|
||||||
this.labelString = labelString;
|
this.labelString = labelString;
|
||||||
|
@ -51,6 +78,9 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
content="";
|
content="";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Composite)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void fill(Composite parent) {
|
public void fill(Composite parent) {
|
||||||
Composite box=new Composite(parent, SWT.NONE);
|
Composite box=new Composite(parent, SWT.NONE);
|
||||||
|
@ -63,11 +93,19 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
text.setLayoutData(layoutData);
|
text.setLayoutData(layoutData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.action.ContributionItem#isDynamic()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isDynamic() {
|
public boolean isDynamic() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the text.
|
||||||
|
*
|
||||||
|
* @param message the new text
|
||||||
|
*/
|
||||||
public void setText(String message){
|
public void setText(String message){
|
||||||
this.content=message;
|
this.content=message;
|
||||||
if(text!=null && !text.isDisposed()) text.setText(content);
|
if(text!=null && !text.isDisposed()) text.setText(content);
|
||||||
|
@ -75,8 +113,14 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The zoom contribution. */
|
||||||
TextContributionItem cursorContribution, markerContribution, markerDiffContribution, zoomContribution;
|
TextContributionItem cursorContribution, markerContribution, markerDiffContribution, zoomContribution;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new wave status bar control.
|
||||||
|
*
|
||||||
|
* @param sync the sync
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public WaveStatusBarControl(UISynchronize sync) {
|
public WaveStatusBarControl(UISynchronize sync) {
|
||||||
super(sync);
|
super(sync);
|
||||||
|
@ -90,6 +134,11 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
manager.appendToGroup(StatusLineManager.BEGIN_GROUP, zoomContribution);
|
manager.appendToGroup(StatusLineManager.BEGIN_GROUP, zoomContribution);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selection.
|
||||||
|
*
|
||||||
|
* @param selection the new selection
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION)@Optional IStructuredSelection selection){
|
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION)@Optional IStructuredSelection selection){
|
||||||
if(manager!=null && selection!=null){
|
if(manager!=null && selection!=null){
|
||||||
|
@ -107,21 +156,45 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the zoom event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @return the zoom event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getZoomEvent(@UIEventTopic(ZOOM_LEVEL) String text) {
|
public void getZoomEvent(@UIEventTopic(ZOOM_LEVEL) String text) {
|
||||||
zoomContribution.setText(text);
|
zoomContribution.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the cursor event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @return the cursor event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getCursorEvent(@UIEventTopic(CURSOR_TIME) String text) {
|
public void getCursorEvent(@UIEventTopic(CURSOR_TIME) String text) {
|
||||||
cursorContribution.setText(text);
|
cursorContribution.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the marker event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @return the marker event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getMarkerEvent(@UIEventTopic(MARKER_TIME) String text) {
|
public void getMarkerEvent(@UIEventTopic(MARKER_TIME) String text) {
|
||||||
markerContribution.setText(text);
|
markerContribution.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the diff event.
|
||||||
|
*
|
||||||
|
* @param text the text
|
||||||
|
* @return the diff event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getDiffEvent(@UIEventTopic(MARKER_DIFF) String text) {
|
public void getDiffEvent(@UIEventTopic(MARKER_DIFF) String text) {
|
||||||
markerDiffContribution.setText(text);
|
markerDiffContribution.setText(text);
|
||||||
|
|
|
@ -18,17 +18,16 @@ import java.util.List;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* Class monitoring a {@link File} for changes.
|
* Class monitoring a {@link File} for changes.
|
||||||
*
|
*
|
||||||
* @author Pascal Essiembre
|
|
||||||
*/
|
*/
|
||||||
public class FileMonitor {
|
public class FileMonitor {
|
||||||
|
|
||||||
/** The timer. */
|
/** The timer. */
|
||||||
private Timer timer;
|
private Timer timer;
|
||||||
|
|
||||||
|
/** The enabled. */
|
||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
|
|
||||||
/** The timer entries. */
|
/** The timer entries. */
|
||||||
|
@ -96,10 +95,20 @@ public class FileMonitor {
|
||||||
if(enabled) listener.fileChanged(file);
|
if(enabled) listener.fileChanged(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if is enabled.
|
||||||
|
*
|
||||||
|
* @return true, if is enabled
|
||||||
|
*/
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the enabled.
|
||||||
|
*
|
||||||
|
* @param enabled the new enabled
|
||||||
|
*/
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(boolean enabled) {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,13 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* Listener interested in {@link File} changes.
|
* Listener interested in {@link File} changes.
|
||||||
*
|
*
|
||||||
* @author Pascal Essiembre
|
|
||||||
*/
|
*/
|
||||||
public interface IFileChangeListener {
|
public interface IFileChangeListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when a file changes.
|
* Invoked when a file changes.
|
||||||
*
|
*
|
||||||
* @param fileName
|
* @param file the file
|
||||||
* name of changed file.
|
|
||||||
*/
|
*/
|
||||||
public void fileChanged(List<File> file);
|
public void fileChanged(List<File> file);
|
||||||
}
|
}
|
|
@ -10,8 +10,14 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.e4.application.internal.util;
|
package com.minres.scviewer.e4.application.internal.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Interface IModificationChecker. Allows to trigger a check independent of the timer
|
||||||
|
*/
|
||||||
public interface IModificationChecker {
|
public interface IModificationChecker {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check.
|
||||||
|
*/
|
||||||
public void check();
|
public void check();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,15 +40,11 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.wb.swt.ResourceManager;
|
import org.eclipse.wb.swt.ResourceManager;
|
||||||
import org.eclipse.wb.swt.SWTResourceManager;
|
import org.eclipse.wb.swt.SWTResourceManager;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* The Class AboutDialog.
|
* The Class AboutDialog.
|
||||||
*/
|
*/
|
||||||
public class AboutDialog extends Dialog {
|
public class AboutDialog extends Dialog {
|
||||||
|
|
||||||
/** The styled text. */
|
|
||||||
// protected StyledText styledText;
|
|
||||||
|
|
||||||
/** The product title. */
|
/** The product title. */
|
||||||
private String productTitle=
|
private String productTitle=
|
||||||
"\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.0\n";
|
"\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.0\n";
|
||||||
|
@ -64,8 +60,7 @@ public class AboutDialog extends Dialog {
|
||||||
/**
|
/**
|
||||||
* Create the dialog.
|
* Create the dialog.
|
||||||
*
|
*
|
||||||
* @param parent the parent
|
* @param parentShell the parent shell
|
||||||
* @param style the style
|
|
||||||
*/
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public AboutDialog(Shell parentShell) {
|
public AboutDialog(Shell parentShell) {
|
||||||
|
@ -75,6 +70,9 @@ public class AboutDialog extends Dialog {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create contents of the dialog.
|
* Create contents of the dialog.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
* @return the control
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Control createDialogArea(Composite parent) {
|
protected Control createDialogArea(Composite parent) {
|
||||||
|
@ -153,6 +151,9 @@ public class AboutDialog extends Dialog {
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
|
||||||
|
*/
|
||||||
protected void createButtonsForButtonBar(Composite parent) {
|
protected void createButtonsForButtonBar(Composite parent) {
|
||||||
// create OK button
|
// create OK button
|
||||||
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);
|
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);
|
||||||
|
|
|
@ -72,36 +72,55 @@ import com.minres.scviewer.e4.application.handlers.AddWaveformHandler;
|
||||||
import com.minres.scviewer.e4.application.provider.TxDbContentProvider;
|
import com.minres.scviewer.e4.application.provider.TxDbContentProvider;
|
||||||
import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
|
import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class DesignBrowser. It contains the design tree, a list of Streams & signals and a few buttons to
|
||||||
|
* add them them to the waveform view
|
||||||
|
*/
|
||||||
public class DesignBrowser {
|
public class DesignBrowser {
|
||||||
|
|
||||||
|
/** The Constant POPUP_ID. */
|
||||||
private static final String POPUP_ID="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu";
|
private static final String POPUP_ID="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu";
|
||||||
|
|
||||||
|
/** The event broker. */
|
||||||
@Inject IEventBroker eventBroker;
|
@Inject IEventBroker eventBroker;
|
||||||
|
|
||||||
|
/** The selection service. */
|
||||||
@Inject ESelectionService selectionService;
|
@Inject ESelectionService selectionService;
|
||||||
|
|
||||||
|
/** The menu service. */
|
||||||
@Inject EMenuService menuService;
|
@Inject EMenuService menuService;
|
||||||
|
|
||||||
|
/** The eclipse ctx. */
|
||||||
@Inject IEclipseContext eclipseCtx;
|
@Inject IEclipseContext eclipseCtx;
|
||||||
|
|
||||||
|
/** The sash form. */
|
||||||
private SashForm sashForm;
|
private SashForm sashForm;
|
||||||
|
|
||||||
|
/** The top. */
|
||||||
Composite top;
|
Composite top;
|
||||||
|
|
||||||
|
/** The bottom. */
|
||||||
private Composite bottom;
|
private Composite bottom;
|
||||||
|
|
||||||
|
/** The tree viewer. */
|
||||||
private TreeViewer treeViewer;
|
private TreeViewer treeViewer;
|
||||||
|
|
||||||
|
/** The name filter. */
|
||||||
private Text nameFilter;
|
private Text nameFilter;
|
||||||
|
|
||||||
|
/** The tx table viewer. */
|
||||||
private TableViewer txTableViewer;
|
private TableViewer txTableViewer;
|
||||||
|
|
||||||
|
/** The append all item. */
|
||||||
ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
|
ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
|
||||||
|
|
||||||
|
/** The attribute filter. */
|
||||||
WaveformAttributeFilter attributeFilter;
|
WaveformAttributeFilter attributeFilter;
|
||||||
|
|
||||||
|
/** The other selection count. */
|
||||||
int thisSelectionCount=0, otherSelectionCount=0;
|
int thisSelectionCount=0, otherSelectionCount=0;
|
||||||
|
|
||||||
|
/** The tree viewer pcl. */
|
||||||
private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() {
|
private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
|
@ -116,8 +135,10 @@ public class DesignBrowser {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private WaveformViewerPart waveformViewerPart;
|
/** The waveform viewer part. */
|
||||||
|
private WaveformViewer waveformViewerPart;
|
||||||
|
|
||||||
|
/** The sash paint listener. */
|
||||||
protected PaintListener sashPaintListener=new PaintListener() {
|
protected PaintListener sashPaintListener=new PaintListener() {
|
||||||
@Override
|
@Override
|
||||||
public void paintControl(PaintEvent e) {
|
public void paintControl(PaintEvent e) {
|
||||||
|
@ -132,6 +153,11 @@ public class DesignBrowser {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the composite.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void createComposite(Composite parent) {
|
public void createComposite(Composite parent) {
|
||||||
sashForm = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
|
sashForm = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
|
||||||
|
@ -151,6 +177,11 @@ public class DesignBrowser {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the tree viewer composite.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
*/
|
||||||
public void createTreeViewerComposite(Composite parent) {
|
public void createTreeViewerComposite(Composite parent) {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
||||||
|
@ -175,6 +206,11 @@ public class DesignBrowser {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the table composite.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
*/
|
||||||
public void createTableComposite(Composite parent) {
|
public void createTableComposite(Composite parent) {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
|
@ -293,6 +329,9 @@ public class DesignBrowser {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the focus.
|
||||||
|
*/
|
||||||
@Focus
|
@Focus
|
||||||
public void setFocus() {
|
public void setFocus() {
|
||||||
txTableViewer.getTable().setFocus();
|
txTableViewer.getTable().setFocus();
|
||||||
|
@ -305,9 +344,15 @@ public class DesignBrowser {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the status event.
|
||||||
|
*
|
||||||
|
* @param waveformViewerPart the waveform viewer part
|
||||||
|
* @return the status event
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getStatusEvent(@UIEventTopic(WaveformViewerPart.ACTIVE_WAVEFORMVIEW) WaveformViewerPart waveformViewerPart) {
|
public void getActiveWaveformViewerEvent(@UIEventTopic(WaveformViewer.ACTIVE_WAVEFORMVIEW) WaveformViewer waveformViewerPart) {
|
||||||
if(this.waveformViewerPart!=null)
|
if(this.waveformViewerPart!=null)
|
||||||
this.waveformViewerPart.storeDesignBrowerState(new DBState());
|
this.waveformViewerPart.storeDesignBrowerState(new DBState());
|
||||||
this.waveformViewerPart=waveformViewerPart;
|
this.waveformViewerPart=waveformViewerPart;
|
||||||
|
@ -328,6 +373,12 @@ public class DesignBrowser {
|
||||||
database.addPropertyChangeListener(treeViewerPCL);
|
database.addPropertyChangeListener(treeViewerPCL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selection.
|
||||||
|
*
|
||||||
|
* @param selection the selection
|
||||||
|
* @param partService the part service
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){
|
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
|
@ -342,6 +393,9 @@ public class DesignBrowser {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update buttons.
|
||||||
|
*/
|
||||||
private void updateButtons() {
|
private void updateButtons() {
|
||||||
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
|
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
|
||||||
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
|
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
|
||||||
|
@ -357,14 +411,26 @@ public class DesignBrowser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class WaveformAttributeFilter.
|
||||||
|
*/
|
||||||
public class WaveformAttributeFilter extends ViewerFilter {
|
public class WaveformAttributeFilter extends ViewerFilter {
|
||||||
|
|
||||||
|
/** The search string. */
|
||||||
private String searchString;
|
private String searchString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the search text.
|
||||||
|
*
|
||||||
|
* @param s the new search text
|
||||||
|
*/
|
||||||
public void setSearchText(String s) {
|
public void setSearchText(String s) {
|
||||||
this.searchString = ".*" + s + ".*";
|
this.searchString = ".*" + s + ".*";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
||||||
if (searchString == null || searchString.length() == 0) {
|
if (searchString == null || searchString.length() == 0) {
|
||||||
|
@ -378,6 +444,12 @@ public class DesignBrowser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the filtered children.
|
||||||
|
*
|
||||||
|
* @param viewer the viewer
|
||||||
|
* @return the filtered children
|
||||||
|
*/
|
||||||
protected Object[] getFilteredChildren(TableViewer viewer){
|
protected Object[] getFilteredChildren(TableViewer viewer){
|
||||||
Object parent = viewer.getInput();
|
Object parent = viewer.getInput();
|
||||||
if(parent==null) return new Object[0];
|
if(parent==null) return new Object[0];
|
||||||
|
@ -402,32 +474,60 @@ public class DesignBrowser {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run command.
|
||||||
|
*
|
||||||
|
* @param handler the handler
|
||||||
|
* @param annotation the annotation
|
||||||
|
* @param where the where
|
||||||
|
* @param all the all
|
||||||
|
* @return the object
|
||||||
|
*/
|
||||||
protected Object runCommand(AddWaveformHandler handler, Class<? extends Annotation> annotation, String where, Boolean all) {
|
protected Object runCommand(AddWaveformHandler handler, Class<? extends Annotation> annotation, String where, Boolean all) {
|
||||||
ContextInjectionFactory.inject(handler, eclipseCtx);
|
ContextInjectionFactory.inject(handler, eclipseCtx);
|
||||||
eclipseCtx.set(AddWaveformHandler.PARAM_WHERE_ID, where);
|
eclipseCtx.set(AddWaveformHandler.PARAM_WHERE_ID, where);
|
||||||
eclipseCtx.set(AddWaveformHandler.PARAM_ALL_ID, all.toString());
|
eclipseCtx.set(AddWaveformHandler.PARAM_ALL_ID, all.toString());
|
||||||
eclipseCtx.set(DesignBrowser.class, this);
|
eclipseCtx.set(DesignBrowser.class, this);
|
||||||
eclipseCtx.set(WaveformViewerPart.class, waveformViewerPart);
|
eclipseCtx.set(WaveformViewer.class, waveformViewerPart);
|
||||||
Object result = ContextInjectionFactory.invoke(handler, annotation, eclipseCtx);
|
Object result = ContextInjectionFactory.invoke(handler, annotation, eclipseCtx);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the filtered children.
|
||||||
|
*
|
||||||
|
* @return the filtered children
|
||||||
|
*/
|
||||||
public Object[] getFilteredChildren() {
|
public Object[] getFilteredChildren() {
|
||||||
return getFilteredChildren(txTableViewer);
|
return getFilteredChildren(txTableViewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WaveformViewerPart getActiveWaveformViewerPart() {
|
/**
|
||||||
|
* Gets the active waveform viewer part.
|
||||||
|
*
|
||||||
|
* @return the active waveform viewer part
|
||||||
|
*/
|
||||||
|
public WaveformViewer getActiveWaveformViewerPart() {
|
||||||
return waveformViewerPart;
|
return waveformViewerPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class DBState.
|
||||||
|
*/
|
||||||
class DBState {
|
class DBState {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new DB state.
|
||||||
|
*/
|
||||||
public DBState() {
|
public DBState() {
|
||||||
this.expandedElements=treeViewer.getExpandedElements();
|
this.expandedElements=treeViewer.getExpandedElements();
|
||||||
this.treeSelection=treeViewer.getSelection();
|
this.treeSelection=treeViewer.getSelection();
|
||||||
this.tableSelection=txTableViewer.getSelection();
|
this.tableSelection=txTableViewer.getSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply.
|
||||||
|
*/
|
||||||
public void apply() {
|
public void apply() {
|
||||||
treeViewer.setExpandedElements(expandedElements);
|
treeViewer.setExpandedElements(expandedElements);
|
||||||
treeViewer.setSelection(treeSelection, true);
|
treeViewer.setSelection(treeSelection, true);
|
||||||
|
@ -435,8 +535,13 @@ public class DesignBrowser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The expanded elements. */
|
||||||
private Object[] expandedElements;
|
private Object[] expandedElements;
|
||||||
|
|
||||||
|
/** The tree selection. */
|
||||||
private ISelection treeSelection;
|
private ISelection treeSelection;
|
||||||
|
|
||||||
|
/** The table selection. */
|
||||||
private ISelection tableSelection;
|
private ISelection tableSelection;
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -13,19 +13,46 @@ package com.minres.scviewer.e4.application.parts;
|
||||||
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.workbench.modeling.IPartListener;
|
import org.eclipse.e4.ui.workbench.modeling.IPartListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default implementation of a {@link IPartListener}.
|
||||||
|
* The class that is interested in processing a part
|
||||||
|
* event extends this class overriding the respective method, and the object created
|
||||||
|
* with that class is registered with a component using the
|
||||||
|
* component's <code>addPartListener<code> method. When
|
||||||
|
* the part event occurs, that object's appropriate
|
||||||
|
* method is invoked.
|
||||||
|
*
|
||||||
|
* @see PartEvent
|
||||||
|
*/
|
||||||
public class PartListener implements IPartListener {
|
public class PartListener implements IPartListener {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.e4.ui.workbench.modeling.IPartListener#partBroughtToTop(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partBroughtToTop(MPart part) {}
|
public void partBroughtToTop(MPart part) {}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.e4.ui.workbench.modeling.IPartListener#partActivated(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partActivated(MPart part) {}
|
public void partActivated(MPart part) {}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.e4.ui.workbench.modeling.IPartListener#partDeactivated(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partDeactivated(MPart part) {}
|
public void partDeactivated(MPart part) {}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.e4.ui.workbench.modeling.IPartListener#partHidden(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partHidden(MPart part) {}
|
public void partHidden(MPart part) {}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.e4.ui.workbench.modeling.IPartListener#partVisible(org.eclipse.e4.ui.model.application.ui.basic.MPart)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void partVisible(MPart part) {}
|
public void partVisible(MPart part) {}
|
||||||
}
|
}
|
|
@ -57,32 +57,51 @@ import com.minres.scviewer.database.ITxAttribute;
|
||||||
import com.minres.scviewer.database.ITxRelation;
|
import com.minres.scviewer.database.ITxRelation;
|
||||||
import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider;
|
import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TransactionDetails shows the details of a selected transaction.
|
||||||
|
*/
|
||||||
public class TransactionDetails {
|
public class TransactionDetails {
|
||||||
|
|
||||||
|
/** The Constant COLUMN_FIRST. */
|
||||||
// Column constants
|
// Column constants
|
||||||
public static final int COLUMN_FIRST = 0;
|
public static final int COLUMN_FIRST = 0;
|
||||||
|
|
||||||
|
/** The Constant COLUMN_SECOND. */
|
||||||
public static final int COLUMN_SECOND = 1;
|
public static final int COLUMN_SECOND = 1;
|
||||||
|
|
||||||
|
/** The Constant COLUMN_THIRD. */
|
||||||
public static final int COLUMN_THIRD = 2;
|
public static final int COLUMN_THIRD = 2;
|
||||||
|
|
||||||
|
/** The event broker. */
|
||||||
@Inject IEventBroker eventBroker;
|
@Inject IEventBroker eventBroker;
|
||||||
|
|
||||||
|
/** The selection service. */
|
||||||
@Inject ESelectionService selectionService;
|
@Inject ESelectionService selectionService;
|
||||||
|
|
||||||
|
/** The name filter. */
|
||||||
private Text nameFilter;
|
private Text nameFilter;
|
||||||
|
|
||||||
|
/** The tree viewer. */
|
||||||
private TreeViewer treeViewer;
|
private TreeViewer treeViewer;
|
||||||
|
|
||||||
|
/** The col3. */
|
||||||
private TreeViewerColumn col1, col2, col3;
|
private TreeViewerColumn col1, col2, col3;
|
||||||
|
|
||||||
|
/** The attribute filter. */
|
||||||
TxAttributeFilter attributeFilter;
|
TxAttributeFilter attributeFilter;
|
||||||
|
|
||||||
|
/** The view sorter. */
|
||||||
TxAttributeViewerSorter viewSorter;
|
TxAttributeViewerSorter viewSorter;
|
||||||
|
|
||||||
private WaveformViewerPart waveformViewerPart;
|
/** The waveform viewer part. */
|
||||||
|
private WaveformViewer waveformViewerPart;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the composite.
|
||||||
|
*
|
||||||
|
* @param parent the parent
|
||||||
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void createComposite(final Composite parent) {
|
public void createComposite(final Composite parent) {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
@ -207,16 +226,30 @@ public class TransactionDetails {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the focus.
|
||||||
|
*/
|
||||||
@Focus
|
@Focus
|
||||||
public void setFocus() {
|
public void setFocus() {
|
||||||
treeViewer.getTree().setFocus();
|
treeViewer.getTree().setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the status event.
|
||||||
|
*
|
||||||
|
* @param part the part
|
||||||
|
* @return the status event
|
||||||
|
*/
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
public void getStatusEvent(@UIEventTopic(WaveformViewerPart.ACTIVE_WAVEFORMVIEW) WaveformViewerPart part) {
|
public void getStatusEvent(@UIEventTopic(WaveformViewer.ACTIVE_WAVEFORMVIEW) WaveformViewer part) {
|
||||||
this.waveformViewerPart=part;
|
this.waveformViewerPart=part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selection.
|
||||||
|
*
|
||||||
|
* @param selection the new selection
|
||||||
|
*/
|
||||||
@Inject
|
@Inject
|
||||||
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection){
|
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection){
|
||||||
if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed()){
|
if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed()){
|
||||||
|
@ -231,10 +264,22 @@ public class TransactionDetails {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time to string.
|
||||||
|
*
|
||||||
|
* @param time the time
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
String timeToString(Long time){
|
String timeToString(Long time){
|
||||||
return waveformViewerPart.getScaledTime(time);
|
return waveformViewerPart.getScaledTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tx to string.
|
||||||
|
*
|
||||||
|
* @param tx the tx
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
String txToString(ITx tx){
|
String txToString(ITx tx){
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())).
|
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())).
|
||||||
|
@ -242,21 +287,29 @@ public class TransactionDetails {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxAttributeViewerSorter.
|
||||||
|
*/
|
||||||
class TxAttributeViewerSorter extends ViewerSorter {
|
class TxAttributeViewerSorter extends ViewerSorter {
|
||||||
|
|
||||||
|
/** The Constant ASCENDING. */
|
||||||
private static final int ASCENDING = 0;
|
private static final int ASCENDING = 0;
|
||||||
|
|
||||||
|
/** The Constant DESCENDING. */
|
||||||
private static final int DESCENDING = 1;
|
private static final int DESCENDING = 1;
|
||||||
|
|
||||||
|
/** The column. */
|
||||||
private int column;
|
private int column;
|
||||||
|
|
||||||
|
/** The direction. */
|
||||||
private int direction;
|
private int direction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does the sort. If it's a different column from the previous sort, do an
|
* Does the sort. If it's a different column from the previous sort, do an
|
||||||
* ascending sort. If it's the same column as the last sort, toggle the sort
|
* ascending sort. If it's the same column as the last sort, toggle the sort
|
||||||
* direction.
|
* direction.
|
||||||
*
|
*
|
||||||
* @param column
|
* @param column the column
|
||||||
*/
|
*/
|
||||||
public void doSort(int column) {
|
public void doSort(int column) {
|
||||||
if (column == this.column) {
|
if (column == this.column) {
|
||||||
|
@ -270,7 +323,12 @@ public class TransactionDetails {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares the object for sorting
|
* Compares the object for sorting.
|
||||||
|
*
|
||||||
|
* @param viewer the viewer
|
||||||
|
* @param e1 the e1
|
||||||
|
* @param e2 the e2
|
||||||
|
* @return the int
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public int compare(Viewer viewer, Object e1, Object e2) {
|
public int compare(Viewer viewer, Object e1, Object e2) {
|
||||||
|
@ -297,14 +355,26 @@ public class TransactionDetails {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxAttributeFilter.
|
||||||
|
*/
|
||||||
class TxAttributeFilter extends ViewerFilter {
|
class TxAttributeFilter extends ViewerFilter {
|
||||||
|
|
||||||
|
/** The search string. */
|
||||||
private String searchString;
|
private String searchString;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the search text.
|
||||||
|
*
|
||||||
|
* @param s the new search text
|
||||||
|
*/
|
||||||
public void setSearchText(String s) {
|
public void setSearchText(String s) {
|
||||||
this.searchString = ".*" + s + ".*";
|
this.searchString = ".*" + s + ".*";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
||||||
if (searchString == null || searchString.length() == 0) {
|
if (searchString == null || searchString.length() == 0) {
|
||||||
|
@ -321,17 +391,40 @@ public class TransactionDetails {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Type {PROPS, ATTRS, IN_REL, OUT_REL}
|
/**
|
||||||
|
* The Enum Type.
|
||||||
|
*/
|
||||||
|
enum Type {/** The props. */
|
||||||
|
PROPS, /** The attrs. */
|
||||||
|
ATTRS, /** The in rel. */
|
||||||
|
IN_REL, /** The out rel. */
|
||||||
|
OUT_REL}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TreeNode.
|
||||||
|
*/
|
||||||
class TreeNode{
|
class TreeNode{
|
||||||
|
|
||||||
|
/** The type. */
|
||||||
public Type type;
|
public Type type;
|
||||||
|
|
||||||
|
/** The element. */
|
||||||
public ITx element;
|
public ITx element;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new tree node.
|
||||||
|
*
|
||||||
|
* @param element the element
|
||||||
|
* @param type the type
|
||||||
|
*/
|
||||||
public TreeNode(ITx element, Type type){
|
public TreeNode(ITx element, Type type){
|
||||||
this.element=element;
|
this.element=element;
|
||||||
this.type=type;
|
this.type=type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#toString()
|
||||||
|
*/
|
||||||
public String toString(){
|
public String toString(){
|
||||||
switch(type){
|
switch(type){
|
||||||
case PROPS: return "Properties";
|
case PROPS: return "Properties";
|
||||||
|
@ -343,15 +436,27 @@ public class TransactionDetails {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TransactionTreeContentProvider.
|
||||||
|
*/
|
||||||
class TransactionTreeContentProvider implements ITreeContentProvider {
|
class TransactionTreeContentProvider implements ITreeContentProvider {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dispose() { }
|
public void dispose() { }
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object element) {
|
public Object[] getElements(Object element) {
|
||||||
return new Object[]{
|
return new Object[]{
|
||||||
|
@ -362,6 +467,9 @@ public class TransactionDetails {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object[] getChildren(Object element) {
|
public Object[] getChildren(Object element) {
|
||||||
if(element instanceof TreeNode){
|
if(element instanceof TreeNode){
|
||||||
|
@ -398,11 +506,17 @@ public class TransactionDetails {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object getParent(Object element) {
|
public Object getParent(Object element) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean hasChildren(Object element) {
|
public boolean hasChildren(Object element) {
|
||||||
return getChildren(element)!=null;
|
return getChildren(element)!=null;
|
||||||
|
@ -410,16 +524,35 @@ public class TransactionDetails {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class AttributeLabelProvider.
|
||||||
|
*/
|
||||||
class AttributeLabelProvider extends LabelProvider implements IStyledLabelProvider {
|
class AttributeLabelProvider extends LabelProvider implements IStyledLabelProvider {
|
||||||
|
|
||||||
|
/** The field. */
|
||||||
final int field;
|
final int field;
|
||||||
|
|
||||||
|
/** The Constant NAME. */
|
||||||
public static final int NAME=0;
|
public static final int NAME=0;
|
||||||
|
|
||||||
|
/** The Constant TYPE. */
|
||||||
public static final int TYPE=1;
|
public static final int TYPE=1;
|
||||||
|
|
||||||
|
/** The Constant VALUE. */
|
||||||
public static final int VALUE=2;
|
public static final int VALUE=2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new attribute label provider.
|
||||||
|
*
|
||||||
|
* @param field the field
|
||||||
|
*/
|
||||||
public AttributeLabelProvider(int field) {
|
public AttributeLabelProvider(int field) {
|
||||||
this.field=field;
|
this.field=field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public StyledString getStyledText(Object element) {
|
public StyledString getStyledText(Object element) {
|
||||||
switch(field){
|
switch(field){
|
||||||
|
|
|
@ -76,7 +76,6 @@ import com.minres.scviewer.e4.application.internal.util.IModificationChecker;
|
||||||
import com.minres.scviewer.e4.application.preferences.DefaultValuesInitializer;
|
import com.minres.scviewer.e4.application.preferences.DefaultValuesInitializer;
|
||||||
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
||||||
|
|
||||||
// TODO: Auto-generated Javadoc
|
|
||||||
/**
|
/**
|
||||||
* The Class WaveformViewerPart.
|
* The Class WaveformViewerPart.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,10 +21,17 @@ 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;
|
import com.opcoach.e4.preferences.ScopedPreferenceStore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class DefaultValuesInitializer.
|
||||||
|
*/
|
||||||
public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
|
/** The default colors. */
|
||||||
public final Color[] colors = new Color[WaveformColors.values().length];
|
public final Color[] colors = new Color[WaveformColors.values().length];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new default values initializer.
|
||||||
|
*/
|
||||||
public DefaultValuesInitializer() {
|
public DefaultValuesInitializer() {
|
||||||
colors[WaveformColors.LINE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
|
colors[WaveformColors.LINE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
|
||||||
colors[WaveformColors.LINE_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_CYAN);
|
colors[WaveformColors.LINE_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_CYAN);
|
||||||
|
@ -48,6 +55,9 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
||||||
colors[WaveformColors.REL_ARROW_HIGHLITE.ordinal()] = SWTResourceManager.getColor(255, 128, 255);
|
colors[WaveformColors.REL_ARROW_HIGHLITE.ordinal()] = SWTResourceManager.getColor(255, 128, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, PreferenceConstants.PREFERENCES_SCOPE);
|
||||||
|
|
|
@ -10,27 +10,69 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.e4.application.preferences;
|
package com.minres.scviewer.e4.application.preferences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class PreferenceConstants for the preferences dialog & setting.
|
||||||
|
*/
|
||||||
public class PreferenceConstants {
|
public class PreferenceConstants {
|
||||||
|
|
||||||
|
/** The Constant PREFERENCES_SCOPE. */
|
||||||
public static final String PREFERENCES_SCOPE="com.minres.scviewer.e4.application";
|
public static final String PREFERENCES_SCOPE="com.minres.scviewer.e4.application";
|
||||||
|
|
||||||
|
/** The Constant DATABASE_RELOAD. */
|
||||||
public static final String DATABASE_RELOAD="databaseReload";
|
public static final String DATABASE_RELOAD="databaseReload";
|
||||||
|
|
||||||
|
/** The Constant LINE_COLOR. */
|
||||||
public static final String LINE_COLOR="LINE_COLOR";
|
public static final String LINE_COLOR="LINE_COLOR";
|
||||||
|
|
||||||
|
/** The Constant LINE_HIGHLITE_COLOR. */
|
||||||
public static final String LINE_HIGHLITE_COLOR="LINE_HIGHLITE_COLOR";
|
public static final String LINE_HIGHLITE_COLOR="LINE_HIGHLITE_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TRACK_BG_EVEN_COLOR. */
|
||||||
public static final String TRACK_BG_EVEN_COLOR="TRACK_BG_EVEN_COLOR";
|
public static final String TRACK_BG_EVEN_COLOR="TRACK_BG_EVEN_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TRACK_BG_ODD_COLOR. */
|
||||||
public static final String TRACK_BG_ODD_COLOR="TRACK_BG_ODD_COLOR";
|
public static final String TRACK_BG_ODD_COLOR="TRACK_BG_ODD_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TRACK_BG_HIGHLITE_COLOR. */
|
||||||
public static final String TRACK_BG_HIGHLITE_COLOR="TRACK_BG_HIGHLITE_COLOR";
|
public static final String TRACK_BG_HIGHLITE_COLOR="TRACK_BG_HIGHLITE_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TX_BG_COLOR. */
|
||||||
public static final String TX_BG_COLOR="TX_BG_COLOR";
|
public static final String TX_BG_COLOR="TX_BG_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TX_BG_HIGHLITE_COLOR. */
|
||||||
public static final String TX_BG_HIGHLITE_COLOR="TX_BG_HIGHLITE_COLOR";
|
public static final String TX_BG_HIGHLITE_COLOR="TX_BG_HIGHLITE_COLOR";
|
||||||
|
|
||||||
|
/** The Constant TX_BORDER_COLOR. */
|
||||||
public static final String TX_BORDER_COLOR="TX_BORDER_COLOR";
|
public static final String TX_BORDER_COLOR="TX_BORDER_COLOR";
|
||||||
|
|
||||||
|
/** The Constant SIGNAL0_COLOR. */
|
||||||
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR";
|
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR";
|
||||||
|
|
||||||
|
/** The Constant SIGNAL1_COLOR. */
|
||||||
public static final String SIGNAL1_COLOR="SIGNAL1_COLOR";
|
public static final String SIGNAL1_COLOR="SIGNAL1_COLOR";
|
||||||
|
|
||||||
|
/** The Constant SIGNALZ_COLOR. */
|
||||||
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR";
|
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR";
|
||||||
|
|
||||||
|
/** The Constant SIGNALX_COLOR. */
|
||||||
public static final String SIGNALX_COLOR="SIGNALX_COLOR";
|
public static final String SIGNALX_COLOR="SIGNALX_COLOR";
|
||||||
|
|
||||||
|
/** The Constant SIGNAL_TEXT_COLOR. */
|
||||||
public static final String SIGNAL_TEXT_COLOR="SIGNAL_TEXT_COLOR";
|
public static final String SIGNAL_TEXT_COLOR="SIGNAL_TEXT_COLOR";
|
||||||
|
|
||||||
|
/** The Constant CURSOR_COLOR. */
|
||||||
public static final String CURSOR_COLOR="CURSOR_COLOR";
|
public static final String CURSOR_COLOR="CURSOR_COLOR";
|
||||||
|
|
||||||
|
/** The Constant CURSOR_DRAG_COLOR. */
|
||||||
public static final String CURSOR_DRAG_COLOR="CURSOR_DRAG_COLOR";
|
public static final String CURSOR_DRAG_COLOR="CURSOR_DRAG_COLOR";
|
||||||
|
|
||||||
|
/** The Constant CURSOR_TEXT_COLOR. */
|
||||||
public static final String CURSOR_TEXT_COLOR="CURSOR_TEXT_COLOR";
|
public static final String CURSOR_TEXT_COLOR="CURSOR_TEXT_COLOR";
|
||||||
|
|
||||||
|
/** The Constant MARKER_COLOR. */
|
||||||
public static final String MARKER_COLOR="MARKER_COLOR";
|
public static final String MARKER_COLOR="MARKER_COLOR";
|
||||||
|
|
||||||
|
/** The Constant MARKER_TEXT_COLOR. */
|
||||||
public static final String MARKER_TEXT_COLOR="MARKER_TEXT_COLOR";
|
public static final String MARKER_TEXT_COLOR="MARKER_TEXT_COLOR";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,22 @@ package com.minres.scviewer.e4.application.preferences;
|
||||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
|
||||||
/** A sample preference page to show how it works */
|
|
||||||
|
/**
|
||||||
|
* The Class SCViewerPreferencesPage showing the SCViewer top preferences.
|
||||||
|
*/
|
||||||
public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
|
public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new SC viewer preferences page.
|
||||||
|
*/
|
||||||
public SCViewerPreferencesPage() {
|
public SCViewerPreferencesPage() {
|
||||||
super(GRID);
|
super(GRID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,21 @@ import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ui.WaveformColors;
|
import com.minres.scviewer.database.ui.WaveformColors;
|
||||||
|
|
||||||
/** A sample preference page to show how it works */
|
/**
|
||||||
|
* The WaveformView preference page to show the colors to use.
|
||||||
|
*/
|
||||||
public class WaveformPreferencesPage extends FieldEditorPreferencePage {
|
public class WaveformPreferencesPage extends FieldEditorPreferencePage {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new waveform preferences page.
|
||||||
|
*/
|
||||||
public WaveformPreferencesPage() {
|
public WaveformPreferencesPage() {
|
||||||
super(GRID);
|
super(GRID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
|
|
||||||
|
|
|
@ -21,29 +21,50 @@ import com.google.common.collect.Collections2;
|
||||||
import com.minres.scviewer.database.IHierNode;
|
import com.minres.scviewer.database.IHierNode;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxDbContentProvider providing the tree content of a database for the respective viewer.
|
||||||
|
*/
|
||||||
public class TxDbContentProvider implements ITreeContentProvider {
|
public class TxDbContentProvider implements ITreeContentProvider {
|
||||||
|
|
||||||
|
/** The show nodes. */
|
||||||
// private List<HierNode> nodes;
|
// private List<HierNode> nodes;
|
||||||
private boolean showNodes;
|
private boolean showNodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new tx db content provider.
|
||||||
|
*/
|
||||||
public TxDbContentProvider() {
|
public TxDbContentProvider() {
|
||||||
super();
|
super();
|
||||||
this.showNodes = false;
|
this.showNodes = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new tx db content provider.
|
||||||
|
*
|
||||||
|
* @param showNodes the show nodes
|
||||||
|
*/
|
||||||
public TxDbContentProvider(boolean showNodes) {
|
public TxDbContentProvider(boolean showNodes) {
|
||||||
super();
|
super();
|
||||||
this.showNodes = showNodes;
|
this.showNodes = showNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dispose() { }
|
public void dispose() { }
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||||
// showNodes=!(newInput instanceof IHierNode);
|
// showNodes=!(newInput instanceof IHierNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
if(inputElement instanceof IHierNode){
|
if(inputElement instanceof IHierNode){
|
||||||
|
@ -64,16 +85,25 @@ public class TxDbContentProvider implements ITreeContentProvider {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object[] getChildren(Object parentElement) {
|
public Object[] getChildren(Object parentElement) {
|
||||||
return getElements(parentElement);
|
return getElements(parentElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object getParent(Object element) {
|
public Object getParent(Object element) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean hasChildren(Object element) {
|
public boolean hasChildren(Object element) {
|
||||||
Object[] obj = getElements(element);
|
Object[] obj = getElements(element);
|
||||||
|
|
|
@ -24,13 +24,21 @@ import com.minres.scviewer.database.ISignalChangeMulti;
|
||||||
import com.minres.scviewer.database.ITxStream;
|
import com.minres.scviewer.database.ITxStream;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxDbLabelProvider providing the labels for the respective viewers.
|
||||||
|
*/
|
||||||
public class TxDbLabelProvider implements ILabelProvider {
|
public class TxDbLabelProvider implements ILabelProvider {
|
||||||
|
|
||||||
|
/** The listeners. */
|
||||||
private List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>();
|
private List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>();
|
||||||
|
|
||||||
|
/** The wave. */
|
||||||
private Image database, stream, signal, folder, wave;
|
private Image database, stream, signal, folder, wave;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new tx db label provider.
|
||||||
|
*/
|
||||||
public TxDbLabelProvider() {
|
public TxDbLabelProvider() {
|
||||||
super();
|
super();
|
||||||
database=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database.png");
|
database=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database.png");
|
||||||
|
@ -40,11 +48,17 @@ public class TxDbLabelProvider implements ILabelProvider {
|
||||||
wave=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/wave.png");
|
wave=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/wave.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addListener(ILabelProviderListener listener) {
|
public void addListener(ILabelProviderListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
if(database!=null) database.dispose();
|
if(database!=null) database.dispose();
|
||||||
|
@ -54,16 +68,25 @@ public class TxDbLabelProvider implements ILabelProvider {
|
||||||
if(wave!=null) wave.dispose();
|
if(wave!=null) wave.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isLabelProperty(Object element, String property) {
|
public boolean isLabelProperty(Object element, String property) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void removeListener(ILabelProviderListener listener) {
|
public void removeListener(ILabelProviderListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Image getImage(Object element) {
|
public Image getImage(Object element) {
|
||||||
if(element instanceof IWaveformDb){
|
if(element instanceof IWaveformDb){
|
||||||
|
@ -82,6 +105,9 @@ public class TxDbLabelProvider implements ILabelProvider {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getText(Object element) {
|
public String getText(Object element) {
|
||||||
return ((IHierNode)element).getName();
|
return ((IHierNode)element).getName();
|
||||||
|
|
|
@ -21,19 +21,32 @@ import com.minres.scviewer.database.IHierNode;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.ITxAttribute;
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxPropertiesContentProvider. Not used atm
|
||||||
|
*/
|
||||||
public class TxPropertiesContentProvider implements IStructuredContentProvider {
|
public class TxPropertiesContentProvider implements IStructuredContentProvider {
|
||||||
|
|
||||||
|
/** The show nodes. */
|
||||||
// private List<HierNode> nodes;
|
// private List<HierNode> nodes;
|
||||||
private boolean showNodes=false;
|
private boolean showNodes=false;
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dispose() { }
|
public void dispose() { }
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||||
showNodes=!(newInput instanceof IHierNode);
|
showNodes=!(newInput instanceof IHierNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
if(inputElement instanceof ITx){
|
if(inputElement instanceof ITx){
|
||||||
|
|
|
@ -20,38 +20,63 @@ import org.eclipse.swt.graphics.Image;
|
||||||
import com.minres.scviewer.database.ITxAttribute;
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
import com.minres.scviewer.e4.application.parts.TransactionDetails;
|
import com.minres.scviewer.e4.application.parts.TransactionDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class TxPropertiesLabelProvider providing the labels of a property to the respective viewer.
|
||||||
|
*/
|
||||||
public class TxPropertiesLabelProvider implements ITableLabelProvider {
|
public class TxPropertiesLabelProvider implements ITableLabelProvider {
|
||||||
|
|
||||||
|
/** The listeners. */
|
||||||
private List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>();
|
private List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new tx properties label provider.
|
||||||
|
*/
|
||||||
public TxPropertiesLabelProvider() {
|
public TxPropertiesLabelProvider() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addListener(ILabelProviderListener listener) {
|
public void addListener(ILabelProviderListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void removeListener(ILabelProviderListener listener) {
|
public void removeListener(ILabelProviderListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isLabelProperty(Object element, String property) {
|
public boolean isLabelProperty(Object element, String property) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Image getColumnImage(Object element, int columnIndex) {
|
public Image getColumnImage(Object element, int columnIndex) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getColumnText(Object element, int columnIndex) {
|
public String getColumnText(Object element, int columnIndex) {
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
|
|
||||||
<booleanAttribute key="append.args" value="true"/>
|
|
||||||
<stringAttribute key="application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
|
|
||||||
<booleanAttribute key="askclear" value="false"/>
|
|
||||||
<booleanAttribute key="automaticAdd" value="false"/>
|
|
||||||
<booleanAttribute key="automaticValidate" value="false"/>
|
|
||||||
<stringAttribute key="bootstrap" value=""/>
|
|
||||||
<stringAttribute key="checked" value="[NONE]"/>
|
|
||||||
<booleanAttribute key="clearConfig" value="false"/>
|
|
||||||
<booleanAttribute key="clearws" value="true"/>
|
|
||||||
<booleanAttribute key="clearwslog" value="false"/>
|
|
||||||
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/SCViewer"/>
|
|
||||||
<booleanAttribute key="default" value="false"/>
|
|
||||||
<booleanAttribute key="includeOptional" value="true"/>
|
|
||||||
<stringAttribute key="location" value="${workspace_loc}/../runtime-com.minres.scviewer.e4.application.product"/>
|
|
||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -clearPersistedState /Users/eyck/Workspaces/cpp/tlm_router01/top.txlog"/>
|
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
|
|
||||||
<stringAttribute key="pde.version" value="3.3"/>
|
|
||||||
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
|
|
||||||
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
|
|
||||||
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt.cocoa@default:false,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
|
|
||||||
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.text@default:default,com.minres.scviewer.database.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:default,com.minres.scviewer.e4.application@default:default,com.opcoach.e4.preferences@default:default"/>
|
|
||||||
<booleanAttribute key="show_selected_only" value="false"/>
|
|
||||||
<booleanAttribute key="tracing" value="false"/>
|
|
||||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
|
||||||
<booleanAttribute key="useDefaultConfig" value="true"/>
|
|
||||||
<booleanAttribute key="useDefaultConfigArea" value="true"/>
|
|
||||||
<booleanAttribute key="useProduct" value="true"/>
|
|
||||||
<booleanAttribute key="usefeatures" value="false"/>
|
|
||||||
</launchConfiguration>
|
|
Loading…
Reference in New Issue