Skip to content

Commit

Permalink
New projects
Browse files Browse the repository at this point in the history
  • Loading branch information
vogella committed Nov 15, 2010
1 parent 53780db commit 8fb33f1
Show file tree
Hide file tree
Showing 260 changed files with 4,977 additions and 283 deletions.
7 changes: 7 additions & 0 deletions de.vogella.databinding.emf.swt/.classpath
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>
28 changes: 28 additions & 0 deletions de.vogella.databinding.emf.swt/.project
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>
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
14 changes: 14 additions & 0 deletions de.vogella.databinding.emf.swt/META-INF/MANIFEST.MF
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
5 changes: 5 additions & 0 deletions de.vogella.databinding.emf.swt/build.properties
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.
16 changes: 16 additions & 0 deletions de.vogella.databinding.emf.swt/model/person.ecore
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>
21 changes: 21 additions & 0 deletions de.vogella.databinding.emf.swt/model/person.genmodel
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>
8 changes: 8 additions & 0 deletions de.vogella.databinding.emf.swt/plugin.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# <copyright>
# </copyright>
#
# $Id$

pluginName = Person Model
providerName = www.example.org
57 changes: 57 additions & 0 deletions de.vogella.databinding.emf.swt/plugin.xml
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>
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);
}
}
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();
}
});
}
}
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);
}

}
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;
}

}
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");
}
}
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);

}

}
Loading

0 comments on commit 8fb33f1

Please sign in to comment.