Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug395283 - Initial implementation without persistence
  • Loading branch information
col-panic committed Nov 30, 2012
1 parent 837789e commit 5e0896f
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.e4.tools.emf.ui;singleton:=true
Bundle-Version: 0.12.0.qualifier
Bundle-Version: 0.12.1.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down Expand Up @@ -45,3 +45,4 @@ Export-Package: org.eclipse.e4.tools.emf.ui.common,
org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;x-internal:=true,
org.eclipse.e4.tools.emf.ui.internal.wbm;x-friends:="org.eclipse.e4.tools.emf.editor"
Service-Component: OSGI-INF/contributioncollector.xml, OSGI-INF/resourceprovider.xml
Bundle-Activator: org.eclipse.e4.tools.emf.ui.internal.ToolsEmfUiPlugin
@@ -0,0 +1,58 @@
/*******************************************************************************
* Copyright (c) 2012 MEDEVIT and FHV and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marco Descher <marco@descher.at> - initial API and implementation
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal;

import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class ToolsEmfUiPlugin implements BundleActivator {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.e4.tools.emf.ui"; //$NON-NLS-1$

private static ToolsEmfUiPlugin plugin;

public static DialogSettings dialogSettings;

public void start(BundleContext context) throws Exception {
plugin = this;
}

public void stop(BundleContext context) throws Exception {
plugin = null;
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static ToolsEmfUiPlugin getDefault() {
return plugin;
}

/**
* @see AbstractUiPlugin#getDialogSettings()
* @return the dialog settings
*/
public IDialogSettings getDialogSettings() {
if (dialogSettings == null)
loadDialogSettings();
return dialogSettings;
}

private void loadDialogSettings() {
// copy from AbstracUiPlugin
dialogSettings = new DialogSettings(PLUGIN_ID);
}

}
Expand Up @@ -7,6 +7,7 @@
*
* Contributors:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
* Marco Descher <marco@descher.at> - Bug395283
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;

Expand All @@ -15,6 +16,7 @@
import org.eclipse.e4.tools.emf.ui.common.IModelResource;
import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.PatternFilter;
import org.eclipse.e4.tools.emf.ui.internal.ToolsEmfUiPlugin;
import org.eclipse.e4.tools.emf.ui.internal.common.component.ControlFactory;
import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
Expand All @@ -23,6 +25,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.ArrayContentProvider;
Expand Down Expand Up @@ -185,4 +188,9 @@ public String getText(Object element) {
return s;
}
}

@Override
protected IDialogSettings getDialogBoundsSettings() {
return ToolsEmfUiPlugin.getDefault().getDialogSettings();
}
}
Expand Up @@ -7,6 +7,7 @@
*
* Contributors:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
* Marco Descher <marco@descher.at> - Bug395283
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;

Expand All @@ -28,12 +29,14 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.StringMatcher;
import org.eclipse.e4.tools.emf.ui.internal.ToolsEmfUiPlugin;
import org.eclipse.e4.ui.model.application.MApplicationElement;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
Expand Down Expand Up @@ -315,4 +318,9 @@ public boolean visit(IResource resource) throws CoreException {
}
}
}

@Override
protected IDialogSettings getDialogBoundsSettings() {
return ToolsEmfUiPlugin.getDefault().getDialogSettings();
}
}
Expand Up @@ -7,16 +7,17 @@
*
* Contributors:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
* Marco Descher <marco@descher.at> - Bug395283
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;

import org.eclipse.e4.tools.emf.ui.internal.common.component.ControlFactory;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.e4.tools.emf.ui.common.IModelResource;
import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.PatternFilter;
import org.eclipse.e4.tools.emf.ui.internal.ToolsEmfUiPlugin;
import org.eclipse.e4.tools.emf.ui.internal.common.component.ControlFactory;
import org.eclipse.e4.ui.model.application.commands.MCategory;
import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
Expand All @@ -25,6 +26,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.ArrayContentProvider;
Expand All @@ -40,8 +42,6 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
Expand Down Expand Up @@ -180,4 +180,9 @@ public String getText(Object element) {
return s;
}
}

@Override
protected IDialogSettings getDialogBoundsSettings() {
return ToolsEmfUiPlugin.getDefault().getDialogSettings();
}
}
Expand Up @@ -8,6 +8,7 @@
* Contributors:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
* Lars Vogel <lars.vogel@gmail.com> - Enhancements
* Marco Descher <marco@descher.at> - Bug395283
******************************************************************************/
package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;

Expand All @@ -18,13 +19,15 @@
import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.ContributionResultHandler;
import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.Filter;
import org.eclipse.e4.tools.emf.ui.internal.Messages;
import org.eclipse.e4.tools.emf.ui.internal.ToolsEmfUiPlugin;
import org.eclipse.e4.tools.emf.ui.internal.common.ClassContributionCollector;
import org.eclipse.e4.ui.model.application.MApplicationElement;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
Expand Down Expand Up @@ -224,4 +227,9 @@ public void result(ContributionData data) {
}

}

@Override
protected IDialogSettings getDialogBoundsSettings() {
return ToolsEmfUiPlugin.getDefault().getDialogSettings();
}
}

0 comments on commit 5e0896f

Please sign in to comment.