-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
260 changed files
with
4,977 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>de.vogella.databinding.emf.swt</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
8 changes: 8 additions & 0 deletions
8
de.vogella.databinding.emf.swt/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Wed Oct 06 11:33:01 CEST 2010 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Swt | ||
Bundle-SymbolicName: de.vogella.databinding.emf.swt; singleton:=true | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-Activator: de.vogella.databinding.emf.swt.Activator | ||
Require-Bundle: org.eclipse.ui, | ||
org.eclipse.core.runtime, | ||
org.eclipse.core.databinding;bundle-version="1.3.100", | ||
org.eclipse.emf.databinding;bundle-version="1.2.0", | ||
org.eclipse.core.databinding.property;bundle-version="1.3.0", | ||
org.eclipse.jface.databinding;bundle-version="1.4.0" | ||
Bundle-ActivationPolicy: lazy | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = plugin.xml,\ | ||
META-INF/,\ | ||
. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ecore:EPackage xmi:version="2.0" | ||
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" | ||
nsURI="http://model/1.0" nsPrefix="model"> | ||
<eClassifiers xsi:type="ecore:EClass" name="Person"> | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gender" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isMarried" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
<eStructuralFeatures xsi:type="ecore:EReference" name="phone" eType="#//Phone"/> | ||
</eClassifiers> | ||
<eClassifiers xsi:type="ecore:EClass" name="Phone"> | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
</eClassifiers> | ||
</ecore:EPackage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<genmodel:GenModel xmi:version="2.0" | ||
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | ||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/de.vogella.databinding.emf.swt/src" | ||
modelPluginID="de.vogella.databinding.emf.swt" modelName="Person" importerID="org.eclipse.emf.importer.ecore" | ||
complianceLevel="6.0" copyrightFields="false"> | ||
<foreignModel>person.ecore</foreignModel> | ||
<genPackages prefix="Model" basePackage="de.vogella.databinding.emf.swt" disposableProviderFactory="true" | ||
ecorePackage="person.ecore#/"> | ||
<genClasses ecoreClass="person.ecore#//Person"> | ||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute person.ecore#//Person/firstName"/> | ||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute person.ecore#//Person/lastName"/> | ||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute person.ecore#//Person/gender"/> | ||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute person.ecore#//Person/isMarried"/> | ||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference person.ecore#//Person/phone"/> | ||
</genClasses> | ||
<genClasses ecoreClass="person.ecore#//Phone"> | ||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute person.ecore#//Phone/number"/> | ||
</genClasses> | ||
</genPackages> | ||
</genmodel:GenModel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
# <copyright> | ||
# </copyright> | ||
# | ||
# $Id$ | ||
|
||
pluginName = Person Model | ||
providerName = www.example.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
|
||
<extension | ||
id="application" | ||
point="org.eclipse.core.runtime.applications"> | ||
<application> | ||
<run | ||
class="de.vogella.databinding.emf.swt.Application"> | ||
</run> | ||
</application> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.perspectives"> | ||
<perspective | ||
name="Perspective" | ||
class="de.vogella.databinding.emf.swt.Perspective" | ||
id="de.vogella.databinding.emf.swt.perspective"> | ||
</perspective> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.views"> | ||
<view | ||
name="View" | ||
class="de.vogella.databinding.emf.swt.View" | ||
id="de.vogella.databinding.emf.swt.view"> | ||
</view> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.perspectiveExtensions"> | ||
<perspectiveExtension | ||
targetID="*"> | ||
<view | ||
standalone="true" | ||
minimized="false" | ||
relative="org.eclipse.ui.editorss" | ||
relationship="left" | ||
id="de.vogella.databinding.emf.swt.view"> | ||
</view> | ||
</perspectiveExtension> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.menus"> | ||
<menuContribution | ||
locationURI="menu:org.eclipse.ui.main.menu"> | ||
<menu | ||
label="File"> | ||
<command | ||
commandId="org.eclipse.ui.file.exit" | ||
label="Exit"> | ||
</command> | ||
</menu> | ||
</menuContribution> | ||
</extension> | ||
|
||
</plugin> |
61 changes: 61 additions & 0 deletions
61
de.vogella.databinding.emf.swt/src/de/vogella/databinding/emf/swt/Activator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.jface.resource.ImageDescriptor; | ||
import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
import org.osgi.framework.BundleContext; | ||
|
||
/** | ||
* The activator class controls the plug-in life cycle | ||
*/ | ||
public class Activator extends AbstractUIPlugin { | ||
|
||
// The plug-in ID | ||
public static final String PLUGIN_ID = "de.vogella.databinding.emf.swt"; //$NON-NLS-1$ | ||
|
||
// The shared instance | ||
private static Activator plugin; | ||
|
||
/** | ||
* The constructor | ||
*/ | ||
public Activator() { | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | ||
*/ | ||
public void start(BundleContext context) throws Exception { | ||
super.start(context); | ||
plugin = this; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | ||
*/ | ||
public void stop(BundleContext context) throws Exception { | ||
plugin = null; | ||
super.stop(context); | ||
} | ||
|
||
/** | ||
* Returns the shared instance | ||
* | ||
* @return the shared instance | ||
*/ | ||
public static Activator getDefault() { | ||
return plugin; | ||
} | ||
|
||
/** | ||
* Returns an image descriptor for the image file at the given | ||
* plug-in relative path | ||
* | ||
* @param path the path | ||
* @return the image descriptor | ||
*/ | ||
public static ImageDescriptor getImageDescriptor(String path) { | ||
return imageDescriptorFromPlugin(PLUGIN_ID, path); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
de.vogella.databinding.emf.swt/src/de/vogella/databinding/emf/swt/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.equinox.app.IApplication; | ||
import org.eclipse.equinox.app.IApplicationContext; | ||
import org.eclipse.swt.widgets.Display; | ||
import org.eclipse.ui.IWorkbench; | ||
import org.eclipse.ui.PlatformUI; | ||
|
||
/** | ||
* This class controls all aspects of the application's execution | ||
*/ | ||
public class Application implements IApplication { | ||
|
||
/* (non-Javadoc) | ||
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) | ||
*/ | ||
public Object start(IApplicationContext context) { | ||
Display display = PlatformUI.createDisplay(); | ||
try { | ||
int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); | ||
if (returnCode == PlatformUI.RETURN_RESTART) { | ||
return IApplication.EXIT_RESTART; | ||
} | ||
return IApplication.EXIT_OK; | ||
} finally { | ||
display.dispose(); | ||
} | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see org.eclipse.equinox.app.IApplication#stop() | ||
*/ | ||
public void stop() { | ||
if (!PlatformUI.isWorkbenchRunning()) | ||
return; | ||
final IWorkbench workbench = PlatformUI.getWorkbench(); | ||
final Display display = workbench.getDisplay(); | ||
display.syncExec(new Runnable() { | ||
public void run() { | ||
if (!display.isDisposed()) | ||
workbench.close(); | ||
} | ||
}); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...a.databinding.emf.swt/src/de/vogella/databinding/emf/swt/ApplicationActionBarAdvisor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.ui.application.ActionBarAdvisor; | ||
import org.eclipse.ui.application.IActionBarConfigurer; | ||
|
||
/** | ||
* An action bar advisor is responsible for creating, adding, and disposing of | ||
* the actions added to a workbench window. Each window will be populated with | ||
* new actions. | ||
*/ | ||
public class ApplicationActionBarAdvisor extends ActionBarAdvisor { | ||
|
||
// Actions - important to allocate these only in makeActions, and then use | ||
// them | ||
// in the fill methods. This ensures that the actions aren't recreated | ||
// when fillActionBars is called with FILL_PROXY. | ||
|
||
public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { | ||
super(configurer); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...a.databinding.emf.swt/src/de/vogella/databinding/emf/swt/ApplicationWorkbenchAdvisor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.ui.application.IWorkbenchWindowConfigurer; | ||
import org.eclipse.ui.application.WorkbenchAdvisor; | ||
import org.eclipse.ui.application.WorkbenchWindowAdvisor; | ||
|
||
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { | ||
|
||
private static final String PERSPECTIVE_ID = "de.vogella.databinding.emf.swt.perspective"; | ||
|
||
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor( | ||
IWorkbenchWindowConfigurer configurer) { | ||
return new ApplicationWorkbenchWindowAdvisor(configurer); | ||
} | ||
|
||
public String getInitialWindowPerspectiveId() { | ||
return PERSPECTIVE_ID; | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...binding.emf.swt/src/de/vogella/databinding/emf/swt/ApplicationWorkbenchWindowAdvisor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.swt.graphics.Point; | ||
import org.eclipse.ui.application.ActionBarAdvisor; | ||
import org.eclipse.ui.application.IActionBarConfigurer; | ||
import org.eclipse.ui.application.IWorkbenchWindowConfigurer; | ||
import org.eclipse.ui.application.WorkbenchWindowAdvisor; | ||
|
||
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { | ||
|
||
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { | ||
super(configurer); | ||
} | ||
|
||
public ActionBarAdvisor createActionBarAdvisor( | ||
IActionBarConfigurer configurer) { | ||
return new ApplicationActionBarAdvisor(configurer); | ||
} | ||
|
||
public void preWindowOpen() { | ||
IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); | ||
configurer.setInitialSize(new Point(400, 300)); | ||
configurer.setShowCoolBar(false); | ||
configurer.setShowStatusLine(false); | ||
configurer.setTitle("RCP Application"); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
de.vogella.databinding.emf.swt/src/de/vogella/databinding/emf/swt/Perspective.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.vogella.databinding.emf.swt; | ||
|
||
import org.eclipse.ui.IPageLayout; | ||
import org.eclipse.ui.IPerspectiveFactory; | ||
|
||
public class Perspective implements IPerspectiveFactory { | ||
|
||
public void createInitialLayout(IPageLayout layout) { | ||
layout.setEditorAreaVisible(false); | ||
layout.setFixed(true); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.