Skip to content

Commit 43c4765

Browse files
committed
#117 extract .common plugin with CommonDialogs and CommonConsole
1 parent 8a4d79d commit 43c4765

File tree

20 files changed

+244
-51
lines changed

20 files changed

+244
-51
lines changed

org.nodeclipse.common/.classpath

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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

org.nodeclipse.common/.project

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.nodeclipse.common</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+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
</projectDescription>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Nodeclipse Common
4+
Bundle-SymbolicName: org.nodeclipse.common; singleton:=true
5+
Bundle-Version: 0.9.0.qualifier
6+
Bundle-Activator: org.nodeclipse.common.Activator
7+
Bundle-Vendor: Enide
8+
Require-Bundle: org.eclipse.ui,
9+
org.eclipse.core.runtime,
10+
org.eclipse.ui.ide,
11+
org.eclipse.ui.console
12+
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
13+
Bundle-ActivationPolicy: lazy
14+
Export-Package: org.nodeclipse.common.preferences,
15+
org.nodeclipse.common.ui

org.nodeclipse.common/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Wow: Ctrl+V with some code in clipboard on java package will create new class and add that code into main() method
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source.. = src/
2+
output.. = bin/
3+
bin.includes = plugin.xml,\
4+
META-INF/,\
5+
.,\
6+
icons/,\
7+
help/,\
8+
HelpToc.xml

org.nodeclipse.common/plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<?eclipse version="3.4"?>
3+
<plugin>
4+
5+
</plugin>

org.nodeclipse.common/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.nodeclipse.nodeclipse-1</groupId>
9+
<artifactId>parent</artifactId>
10+
<version>0.9.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>org.nodeclipse.common</artifactId>
14+
<packaging>eclipse-plugin</packaging>
15+
16+
<name>org.nodeclipse.common</name>
17+
<description>org.nodeclipse.common</description>
18+
</project>
19+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package org.nodeclipse.common;
2+
3+
import org.eclipse.ui.plugin.AbstractUIPlugin;
4+
import org.nodeclipse.common.preferences.CommonConstants;
5+
import org.osgi.framework.BundleContext;
6+
7+
/**
8+
* The activator class controls the plug-in life cycle
9+
*/
10+
public class Activator extends AbstractUIPlugin {
11+
12+
// The plug-in ID
13+
public static final String PLUGIN_ID = CommonConstants.PLUGIN_ID;
14+
15+
// The shared instance
16+
private static Activator plugin;
17+
18+
/**
19+
* The constructor
20+
*/
21+
public Activator() {
22+
}
23+
24+
/*
25+
* (non-Javadoc)
26+
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
27+
*/
28+
public void start(BundleContext context) throws Exception {
29+
super.start(context);
30+
plugin = this;
31+
}
32+
33+
/*
34+
* (non-Javadoc)
35+
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
36+
*/
37+
public void stop(BundleContext context) throws Exception {
38+
plugin = null;
39+
super.stop(context);
40+
}
41+
42+
/**
43+
* Returns the shared instance
44+
*
45+
* @return the shared instance
46+
*/
47+
public static Activator getDefault() {
48+
return plugin;
49+
}
50+
51+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.nodeclipse.common.preferences;
2+
3+
public class CommonConstants {
4+
5+
public static final String PLUGIN_ID = "org.nodeclipse.common"; //$NON-NLS-1$
6+
7+
}

org.nodeclipse.enide.gradle/src/org/nodeclipse/enide/gradle/preferences/Dialogs.java renamed to org.nodeclipse.common/src/org/nodeclipse/common/preferences/CommonDialogs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.nodeclipse.enide.gradle.preferences;
1+
package org.nodeclipse.common.preferences;
22

33
import org.eclipse.jface.dialogs.MessageDialog;
44
import org.eclipse.jface.preference.PreferenceDialog;
@@ -11,7 +11,7 @@
1111
* Dialogs used in .enide.maven, .enide.gradle
1212
* @author Paul Verest, Pushkar Gupte
1313
*/
14-
public class Dialogs {
14+
public class CommonDialogs {
1515

1616

1717
public static void showPreferencesDialog(final String preferencesPage, final String message) {

0 commit comments

Comments
 (0)