Skip to content

Commit 82a4a3d

Browse files
author
jossonsmith
committed
Restructure the SVN repository
0 parents  commit 82a4a3d

241 files changed

Lines changed: 17267 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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"/>
5+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

tests/net.sf.j2s.test.swt/.j2s

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Java2Script Configuration
2+
#Sat May 27 01:53:16 CST 2006
3+
j2s.resources.list=../../plugins/net.sf.j2s.lib_1.0.0/j2slib/j2s-core-util.z.js,../../plugins/net.sf.j2s.lib_1.0.0/j2slib/j2s-browser-native.z.js,../../plugins/net.sf.j2s.lib_1.0.0/j2slib/j2s-swt-basic.z.js,/net.sf.j2s.java.org.eclipse.swt/swt.simple.j2s,bin/net/sf/j2s/test/swt/widgets/TestLink.js,bin/net/sf/j2s/test/swt/widgets/TestButton.js,bin/net/sf/j2s/test/swt/widgets/TestComposite.js,bin/net/sf/j2s/test/swt/widgets/TestText.js
4+
j2s.abandomed.resources.list=bin/net/sf/j2s/test/swt/TestSWTPlugin.js,bin/net/sf/j2s/test/swt/widgets/TestWidgetData.js,bin/net/sf/j2s/test/swt/widgets/TestWidgetHookEventType.js,bin/net/sf/j2s/test/swt/widgets/TestTextVerifyText.js,bin/net/sf/j2s/test/swt/widgets/TestLabelHookEventType.js,bin/net/sf/j2s/test/swt/widgets/Snippet24.js,bin/net/sf/j2s/test/swt/widgets/TestDeferredLayout.js,bin/net/sf/j2s/test/swt/widgets/TestTabFolder.js,bin/net/sf/j2s/test/swt/widgets/TestGroup.js,bin/net/sf/j2s/test/swt/widgets/TestLabel.js
5+
j2s.output.path=bin
6+
j2s.compiler.status=enable

tests/net.sf.j2s.test.swt/.project

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>net.sf.j2s.test.swt</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+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>net.sf.j2s.core.java2scriptbuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.pde.PluginNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Test SWT Plug-in
4+
Bundle-SymbolicName: net.sf.j2s.test.swt
5+
Bundle-Version: 1.0.0
6+
Bundle-Activator: net.sf.j2s.test.swt.TestSWTPlugin
7+
Bundle-Localization: plugin
8+
Require-Bundle: org.eclipse.ui,
9+
org.eclipse.core.runtime
10+
Eclipse-AutoStart: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source.. = src/
2+
output.. = bin/
3+
bin.includes = META-INF/,\
4+
.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package net.sf.j2s.test.swt;
2+
3+
import org.eclipse.ui.plugin.*;
4+
import org.eclipse.jface.resource.ImageDescriptor;
5+
import org.osgi.framework.BundleContext;
6+
7+
/**
8+
* The main plugin class to be used in the desktop.
9+
*/
10+
public class TestSWTPlugin extends AbstractUIPlugin {
11+
12+
//The shared instance.
13+
private static TestSWTPlugin plugin;
14+
15+
/**
16+
* The constructor.
17+
*/
18+
public TestSWTPlugin() {
19+
plugin = this;
20+
}
21+
22+
/**
23+
* This method is called upon plug-in activation
24+
*/
25+
public void start(BundleContext context) throws Exception {
26+
super.start(context);
27+
}
28+
29+
/**
30+
* This method is called when the plug-in is stopped
31+
*/
32+
public void stop(BundleContext context) throws Exception {
33+
super.stop(context);
34+
plugin = null;
35+
}
36+
37+
/**
38+
* Returns the shared instance.
39+
*/
40+
public static TestSWTPlugin getDefault() {
41+
return plugin;
42+
}
43+
44+
/**
45+
* Returns an image descriptor for the image file at the given
46+
* plug-in relative path.
47+
*
48+
* @param path the path
49+
* @return the image descriptor
50+
*/
51+
public static ImageDescriptor getImageDescriptor(String path) {
52+
return AbstractUIPlugin.imageDescriptorFromPlugin("net.sf.j2s.test.swt", path);
53+
}
54+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package net.sf.j2s.test.swt.widgets;
12+
13+
/*
14+
* example snippet: detect CR in a text or combo control (default selelection)
15+
*
16+
* For a list of all SWT example snippets see
17+
* http://www.eclipse.org/swt/snippets/
18+
*/
19+
import org.eclipse.swt.*;
20+
import org.eclipse.swt.widgets.*;
21+
import org.eclipse.swt.layout.*;
22+
23+
public class Snippet24 {
24+
25+
public static void main (String [] args) {
26+
Display display = new Display ();
27+
Shell shell = new Shell (display);
28+
shell.setLayout (new RowLayout ());
29+
Combo combo = new Combo (shell, SWT.NONE);
30+
combo.setItems (new String [] {"A-1", "B-1", "C-1"});
31+
Text text = new Text (shell, SWT.SINGLE | SWT.BORDER);
32+
text.setText ("some text");
33+
combo.addListener (SWT.DefaultSelection, new Listener () {
34+
public void handleEvent (Event e) {
35+
System.out.println (e.widget + " - Default Selection");
36+
}
37+
});
38+
text.addListener (SWT.DefaultSelection, new Listener () {
39+
public void handleEvent (Event e) {
40+
System.out.println (e.widget + " - Default Selection");
41+
}
42+
});
43+
shell.pack ();
44+
shell.open ();
45+
while (!shell.isDisposed()) {
46+
if (!display.readAndDispatch ()) display.sleep ();
47+
}
48+
display.dispose ();
49+
}
50+
}

0 commit comments

Comments
 (0)