Skip to content

Instantly share code, notes, and snippets.

package com.example.miniscout.client.editor;
import java.net.URI;
import org.eclipse.ui.internal.part.NullEditorInput;
public class ContactEditorInput extends NullEditorInput {
private URI input;
@mbruch
mbruch / Field.java
Last active December 17, 2015 00:59
Forms and Database Services API For each class in here: # Copy the raw text of the class, # Select the src folder of com.example.miniscout.shared, # Press ctrl+v to get the class inserted correctly by Eclipse.
package com.example.miniscout.shared;
public class Field {
public Field(String type, String name, String value) {
super();
this.type = type;
this.name = name;
this.value = value;
}
package com.example.miniscout.client.editor;
import java.net.URI;
import com.example.miniscout.shared.Field;
import com.example.miniscout.shared.Form;
public class DatabaseService {
public static Form load(URI uri) {
Form form = new Form();
@mbruch
mbruch / Activator.java
Last active December 17, 2015 08:18
OSGI Service Implementation
package com.example.miniscout.client;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import com.example.miniscout.client.services.LocalDatabaseService;
import com.example.miniscout.shared.IDatabaseService;
public class Activator extends AbstractUIPlugin {
@mbruch
mbruch / Fields.java
Created May 14, 2013 21:47
Extension Point für FormFields
package com.example.miniscout.client.fields;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="Eclipse Kepler" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.recommenders.feature.3rd.orbit.feature.group" version="0.0.0"/>
<unit id="org.eclipse.rcp.sdk.id" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/kepler"/>
</location>
</locations>
</target>
@mbruch
mbruch / Activator.java
Last active December 17, 2015 10:08
Proxy OSGI Service zu HTTP Server für das Client Plugin
package com.example.miniscout.client;
import java.util.Dictionary;
import java.util.Hashtable;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import com.example.miniscout.client.services.LocalDatabaseService;