Skip to content

Commit 6394b5e

Browse files
committed
updates
1 parent 99e2423 commit 6394b5e

File tree

5 files changed

+62
-21
lines changed

5 files changed

+62
-21
lines changed

de.vogella.combug.first/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

de.vogella.combug.first/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>de.vogella.combug.first</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.7
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.7

de.vogella.eclipse.ide.first/src/de/vogella/eclipse/ide/first/MyFirstClass.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ private static int calculateSum(int sum) {
1616
for (int i = 0; i <= 100; i++) {
1717
sum += i;
1818
}
19+
20+
try {
21+
22+
} catch (Exception e) {
23+
// TODO: handle exception
24+
} finally {
25+
26+
}
27+
1928
return sum;
2029
}
2130
}

de.vogella.swt/src/de/vogella/swt/layouts/GridLayoutSWT.java

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,32 @@ public static void main(String[] args) {
2424
shell.setLayout(layout);
2525
// Create a label and a button
2626
Label label = new Label(shell, SWT.NONE);
27-
label.setText("A lable");
27+
label.setText("A label");
2828
Button button = new Button(shell, SWT.PUSH);
2929
button.setText("Press Me");
30-
30+
3131
// Create a new label that will spam two columns
3232
label = new Label(shell, SWT.BORDER);
3333
label.setText("This is a label");
3434
// Create new layout data
3535
GridData data = new GridData(GridData.FILL, GridData.BEGINNING, true,
3636
false, 2, 1);
3737
label.setLayoutData(data);
38-
38+
3939
// Create a new label which is used as a separator
4040
label = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
4141
// Create new layout data
42-
data = new GridData(GridData.FILL, GridData.BEGINNING, true,
43-
false, 2, 1);
44-
data.horizontalSpan=2;
42+
data = new GridData(GridData.FILL, GridData.BEGINNING, true, false, 2,
43+
1);
44+
data.horizontalSpan = 2;
4545
label.setLayoutData(data);
46-
46+
4747
// Create a right aligned button
4848
Button b = new Button(shell, SWT.PUSH);
4949
b.setText("New Button");
50-
51-
data = new GridData(GridData.END, GridData.BEGINNING, false,
52-
false, 2, 1);
50+
51+
data = new GridData(GridData.END, GridData.BEGINNING, false, false, 2,
52+
1);
5353
b.setLayoutData(data);
5454

5555
Spinner spinner = new Spinner(shell, SWT.READ_ONLY);
@@ -61,35 +61,33 @@ public static void main(String[] args) {
6161
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
6262
gridData.widthHint = SWT.DEFAULT;
6363
gridData.heightHint = SWT.DEFAULT;
64-
gridData.horizontalSpan=2;
64+
gridData.horizontalSpan = 2;
6565
spinner.setLayoutData(gridData);
66-
66+
6767
Composite composite = new Composite(shell, SWT.BORDER);
6868
gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
69-
gridData.horizontalSpan= 2;
69+
gridData.horizontalSpan = 2;
7070
composite.setLayoutData(gridData);
7171
composite.setLayout(new GridLayout(1, false));
72-
73-
72+
7473
Text text = new Text(composite, SWT.NONE);
7574
text.setText("Testing");
7675
gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
7776
text.setLayoutData(gridData);
78-
77+
7978
text = new Text(composite, SWT.NONE);
8079
text.setText("Another test");
81-
// gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
82-
// text.setLayoutData(gridData);
80+
// gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
81+
// text.setLayoutData(gridData);
8382
Group group = new Group(shell, SWT.NONE);
8483
group.setText("This is my group");
8584
gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
86-
gridData.horizontalSpan= 2;
85+
gridData.horizontalSpan = 2;
8786
group.setLayoutData(gridData);
8887
group.setLayout(new RowLayout(SWT.VERTICAL));
8988
text = new Text(group, SWT.NONE);
9089
text.setText("Another test");
91-
92-
90+
9391
shell.pack();
9492
shell.open();
9593
while (!shell.isDisposed()) {

0 commit comments

Comments
 (0)