X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.swt%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fswt%2FNewPropertyViewAdapter.java;h=d71021c9c3a2023054314e59dc1af734269fd487;hp=ed2d86a48e55aa8f677869b29c089fb64d34282b;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NewPropertyViewAdapter.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NewPropertyViewAdapter.java index ed2d86a48..d71021c9c 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NewPropertyViewAdapter.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/NewPropertyViewAdapter.java @@ -1,44 +1,44 @@ -/******************************************************************************* - * Copyright (c) 2007, 2012 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.browsing.ui.swt; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter; - -/** - * WARNING: this adapter does not currently handle structural selections, i.e. - * resource paths but only single resources which will result failure to show - * correct data or even worse. - * - * TODO: override {@link #canHandle(ReadGraph, Object)} and - * {@link #openEditor(Object)} to do what's described above. - */ -public class NewPropertyViewAdapter extends AbstractResourceEditorAdapter { - - public NewPropertyViewAdapter() { - super("New Property View", ImageDescriptor.createFromURL( - NewPropertyViewAdapter.class.getResource("../../../../../icons/table_multiple.png"))); - } - - @Override - public boolean canHandle(ReadGraph g, Object r) { - return true; - } - - @Override - public void openEditor(Resource r) throws Exception { - openViewWithId("org.simantics.browsing.ui.graph.propertyView", r); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2012 Association for Decentralized Information Management + * in Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.browsing.ui.swt; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter; + +/** + * WARNING: this adapter does not currently handle structural selections, i.e. + * resource paths but only single resources which will result failure to show + * correct data or even worse. + * + * TODO: override {@link #canHandle(ReadGraph, Object)} and + * {@link #openEditor(Object)} to do what's described above. + */ +public class NewPropertyViewAdapter extends AbstractResourceEditorAdapter { + + public NewPropertyViewAdapter() { + super("New Property View", ImageDescriptor.createFromURL( + NewPropertyViewAdapter.class.getResource("../../../../../icons/table_multiple.png"))); + } + + @Override + public boolean canHandle(ReadGraph g, Object r) { + return true; + } + + @Override + public void openEditor(Resource r) throws Exception { + openViewWithId("org.simantics.browsing.ui.graph.propertyView", r); + } + +}