Skip to content

Commit 7c688e0

Browse files
author
jantje
committed
issue #378
1 parent cc11b14 commit 7c688e0

File tree

1 file changed

+15
-8
lines changed
  • it.baeyens.arduino.monitor/src/it/baeyens/arduino/monitor/views

1 file changed

+15
-8
lines changed

it.baeyens.arduino.monitor/src/it/baeyens/arduino/monitor/views/ScopeView.java

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ protected IStatus run(IProgressMonitor monitor) {
5454
IEclipsePreferences mySCope = InstanceScope.INSTANCE.getNode(Const.NODE_ARDUINO);
5555
int curFsiStatus = mySCope.getInt(flagMonitor, 0) + 1;
5656
mySCope.putInt(flagMonitor, curFsiStatus);
57-
URL pluginStartInitiator = new URL(ScopeView.this.uri.replaceAll(" ", Const.EMPTY_STRING) + Integer.toString(curFsiStatus)); //$NON-NLS-1$
57+
URL pluginStartInitiator = new URL(
58+
ScopeView.this.uri.replaceAll(" ", Const.EMPTY_STRING) + Integer.toString(curFsiStatus)); //$NON-NLS-1$
5859
ScopeView.this.mstatus = pluginStartInitiator.getContent();
5960
} catch (Exception e) {// JABA is not going to add code
6061
}
@@ -108,8 +109,10 @@ public int getTailSize() {
108109
ITheme currentTheme = themeManager.getCurrentTheme();
109110
ColorRegistry colorRegistry = currentTheme.getColorRegistry();
110111

111-
this.myScope = new Oscilloscope(6, dsp, parent, SWT.NONE, colorRegistry.get("it.baeyens.scope.color.background"), //$NON-NLS-1$
112-
colorRegistry.get("it.baeyens.scope.color.foreground"), colorRegistry.get("it.baeyens.scope.color.grid")); //$NON-NLS-1$//$NON-NLS-2$
112+
this.myScope = new Oscilloscope(6, dsp, parent, SWT.NONE,
113+
colorRegistry.get("it.baeyens.scope.color.background"), //$NON-NLS-1$
114+
colorRegistry.get("it.baeyens.scope.color.foreground"), //$NON-NLS-1$
115+
colorRegistry.get("it.baeyens.scope.color.grid")); //$NON-NLS-1$
113116
GridData theGriddata = new GridData(SWT.FILL, SWT.FILL, true, true);
114117
theGriddata.horizontalSpan = 7;
115118

@@ -140,7 +143,8 @@ public void handleEvent(Event event) {
140143
if (!(this.inDrag || this.inSize)) {
141144
this.orgLowRange = ScopeView.this.myScope.getLowRangeValue();
142145
this.orgHighRange = ScopeView.this.myScope.getHighRangeValue();
143-
this.scale = (((float) (ScopeView.this.myScope.getHighRangeValue() - ScopeView.this.myScope.getLowRangeValue()))
146+
this.scale = (((float) (ScopeView.this.myScope.getHighRangeValue()
147+
- ScopeView.this.myScope.getLowRangeValue()))
144148
/ (float) ScopeView.this.myScope.getSize().y);
145149
this.orgY = event.y;
146150
switch (event.button) {
@@ -176,8 +180,9 @@ public void handleEvent(Event event) {
176180
break;
177181
case SWT.MouseDoubleClick:
178182
// save the data
179-
FileDialog dialog = new FileDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), SWT.SAVE);
180-
dialog.setFilterExtensions(new String[] { "*.cvs" }); //$NON-NLS-1$
183+
FileDialog dialog = new FileDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
184+
SWT.SAVE);
185+
dialog.setFilterExtensions(new String[] { "*.csv" }); //$NON-NLS-1$
181186
String fileName = dialog.open();
182187
if (!fileName.isEmpty()) {
183188
ScopeView.this.myScope.saveData(fileName);
@@ -267,7 +272,8 @@ private void registerSerialService(ServiceEvent event) {
267272
}
268273

269274
/**
270-
* When the scope starts it needs to look is there are already serial services running. This method looks for the serial services and if found
275+
* When the scope starts it needs to look is there are already serial
276+
* services running. This method looks for the serial services and if found
271277
* this class is added as listener
272278
*/
273279
private void registerExistingSerialService() {
@@ -293,7 +299,8 @@ private void registerSerialService(Serial service) {
293299
@Override
294300
public void run() {
295301
ScopeView.this.mySerial.addListener(ScopeView.this.myScopelistener);
296-
ScopeView.this.myScope.setStatus(Messages.ScopeView_connected_to + ScopeView.this.mySerial.toString());
302+
ScopeView.this.myScope
303+
.setStatus(Messages.ScopeView_connected_to + ScopeView.this.mySerial.toString());
297304
ScopeView.this.myScope.setShowLabels(true);
298305
ScopeView.this.myScope.setnewBackgroundImage();
299306
}

0 commit comments

Comments
 (0)