1 11 12 package org.eclipse.ui.internal.tweaklets; 13 14 import org.eclipse.jface.preference.IPreferenceStore; 15 import org.eclipse.swt.widgets.Button; 16 import org.eclipse.swt.widgets.Composite; 17 import org.eclipse.ui.IEditorInput; 18 import org.eclipse.ui.IEditorReference; 19 import org.eclipse.ui.internal.EditorAreaHelper; 20 import org.eclipse.ui.internal.EditorManager; 21 import org.eclipse.ui.internal.IPreferenceConstants; 22 import org.eclipse.ui.internal.WorkbenchPage; 23 import org.eclipse.ui.internal.WorkbenchPlugin; 24 import org.eclipse.ui.internal.registry.EditorDescriptor; 25 import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey; 26 27 31 public abstract class TabBehaviour { 32 33 public static TweakKey KEY = new Tweaklets.TweakKey(TabBehaviour.class); 34 35 static { 36 Tweaklets.setDefault(TabBehaviour.KEY, new TabBehaviourMRU()); 37 } 38 39 43 public abstract boolean alwaysShowPinAction(); 44 45 50 public abstract IEditorReference findReusableEditor(WorkbenchPage page); 51 52 public abstract IEditorReference reuseInternalEditor(WorkbenchPage page, 53 EditorManager manager, EditorAreaHelper editorPresentation, 54 EditorDescriptor desc, IEditorInput input, 55 IEditorReference reusableEditorRef); 56 57 63 public void setPreferenceVisibility(Composite editorReuseGroup, 64 Button showMultipleEditorTabs) { 65 } 66 67 70 public boolean autoPinOnDirty() { 71 return false; 72 } 73 74 77 public boolean isPerTabHistoryEnabled() { 78 return false; 79 } 80 81 85 public int getReuseEditorMatchFlags(int originalMatchFlags) { 86 return originalMatchFlags; 87 } 88 89 92 public int getEditorReuseThreshold() { 93 IPreferenceStore store = WorkbenchPlugin.getDefault() 94 .getPreferenceStore(); 95 return store.getInt(IPreferenceConstants.REUSE_EDITORS); 96 } 97 98 101 public boolean enableMRUTabVisibility() { 102 return true; 103 } 104 105 } 106 | Popular Tags |