-/*******************************************************************************\r
- * Copyright (c) 2012 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.ui.workbench.editor.input;\r
-\r
-import org.eclipse.ui.IEditorInput;\r
-import org.eclipse.ui.IEditorMatchingStrategy;\r
-import org.eclipse.ui.IEditorReference;\r
-import org.eclipse.ui.PartInitException;\r
-import org.simantics.ui.workbench.IResourceEditorInput;\r
-import org.simantics.ui.workbench.IResourceEditorInput2;\r
-import org.simantics.ui.workbench.ResourceEditorInput;\r
-import org.simantics.ui.workbench.ResourceEditorInput2;\r
-\r
-/**\r
- * An editor input matching strategy that does not take into account the name in\r
- * the editor input. This is because in {@link ResourceEditorInput} and\r
- * {@link ResourceEditorInput2} the name is not important, only\r
- * <code>equals</code> is.\r
- * \r
- * @author Tuukka Lehtonen\r
- * \r
- * @see IResourceEditorInput\r
- * @see IResourceEditorInput2\r
- * @see ResourceEditorInput\r
- * @see ResourceEditorInput2\r
- */\r
-public class ResourceEditorInputMatchingStrategy implements IEditorMatchingStrategy {\r
-\r
- @Override\r
- public boolean matches(IEditorReference editorRef, IEditorInput input) {\r
- if (!(input instanceof IResourceEditorInput))\r
- return false;\r
-\r
- try {\r
- IEditorInput editorInput = editorRef.getEditorInput();\r
- return input.equals(editorInput);\r
- } catch (PartInitException e) {\r
- return false;\r
- }\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 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.ui.workbench.editor.input;
+
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorMatchingStrategy;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.PartInitException;
+import org.simantics.ui.workbench.IResourceEditorInput;
+import org.simantics.ui.workbench.IResourceEditorInput2;
+import org.simantics.ui.workbench.ResourceEditorInput;
+import org.simantics.ui.workbench.ResourceEditorInput2;
+
+/**
+ * An editor input matching strategy that does not take into account the name in
+ * the editor input. This is because in {@link ResourceEditorInput} and
+ * {@link ResourceEditorInput2} the name is not important, only
+ * <code>equals</code> is.
+ *
+ * @author Tuukka Lehtonen
+ *
+ * @see IResourceEditorInput
+ * @see IResourceEditorInput2
+ * @see ResourceEditorInput
+ * @see ResourceEditorInput2
+ */
+public class ResourceEditorInputMatchingStrategy implements IEditorMatchingStrategy {
+
+ @Override
+ public boolean matches(IEditorReference editorRef, IEditorInput input) {
+ if (!(input instanceof IResourceEditorInput))
+ return false;
+
+ try {
+ IEditorInput editorInput = editorRef.getEditorInput();
+ return input.equals(editorInput);
+ } catch (PartInitException e) {
+ return false;
+ }
+ }
+
+}