Small improvements

This commit is contained in:
konsoletyper 2014-08-08 18:02:43 +04:00
parent befde46ca2
commit fa1a620fdb
4 changed files with 14 additions and 1 deletions

View File

@ -232,6 +232,8 @@ public class DebugInformation {
static class FileDescriptionBuilder { static class FileDescriptionBuilder {
FileDescriptionProto[] files; FileDescriptionProto[] files;
int lastFileIndex = -1;
int lastSourceLine = -1;
public FileDescriptionBuilder(int size) { public FileDescriptionBuilder(int size) {
files = new FileDescriptionProto[size]; files = new FileDescriptionProto[size];
@ -244,6 +246,11 @@ public class DebugInformation {
if (sourceLine == -1 || fileIndex == -1) { if (sourceLine == -1 || fileIndex == -1) {
return; return;
} }
if (lastFileIndex == fileIndex && lastSourceLine == sourceLine) {
return;
}
lastFileIndex = fileIndex;
lastSourceLine = sourceLine;
FileDescriptionProto proto = files[fileIndex]; FileDescriptionProto proto = files[fileIndex];
proto.addLocation(sourceLine, line, column); proto.addLocation(sourceLine, line, column);
} }

View File

@ -41,4 +41,9 @@ public class JavaScriptLocation {
public int getColumn() { public int getColumn() {
return column; return column;
} }
@Override
public String toString() {
return script + ":(" + line + ";" + column + ")";
}
} }

View File

@ -26,6 +26,7 @@ public class TeaVMTab extends AbstractLaunchConfigurationTab {
GridLayout layout = new GridLayout(); GridLayout layout = new GridLayout();
layout.verticalSpacing = 6; layout.verticalSpacing = 6;
layout.numColumns = 2; layout.numColumns = 2;
layout.horizontalSpacing = 6;
root.setLayout(layout); root.setLayout(layout);
Label portLabel = new Label(root, SWT.NONE); Label portLabel = new Label(root, SWT.NONE);

View File

@ -3,7 +3,7 @@
<description name="TeaVM update site"> <description name="TeaVM update site">
TeaVM update site TeaVM update site
</description> </description>
<feature url="features/teavm.eclipse.feature_0.2.0.201408071508.jar" id="teavm.eclipse.feature" version="0.2.0.201408071508" os="aix,hpux,linux,macosx,qnx,solaris,win32" ws="carbon,cocoa,gtk,motif,photon,win32,wpf" arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64"> <feature url="features/teavm.eclipse.feature_0.2.0.201408071607.jar" id="teavm.eclipse.feature" version="0.2.0.201408071607" os="aix,hpux,linux,macosx,qnx,solaris,win32" ws="carbon,cocoa,gtk,motif,photon,win32,wpf" arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64">
<category name="teavm"/> <category name="teavm"/>
</feature> </feature>
<category-def name="teavm" label="TeaVM"/> <category-def name="teavm" label="TeaVM"/>