/** * <b>Only the views are mirrored. All model values for left and right are not changed!</b> * * @return true if the left and right side of the viewer are mirrored. Default is false. * @since 3.7 */ public boolean isMirrored() { Object property = getProperty(MIRRORED); return property instanceof Boolean && (Boolean) property; }
static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) { if (cc != null) { Object value= cc.getProperty(key); if (value instanceof Boolean) return ((Boolean) value).booleanValue(); } return dflt; }
public static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) { if (cc != null) { Object value= cc.getProperty(key); if (value instanceof Boolean) return ((Boolean) value).booleanValue(); } return dflt; }
static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) { if (cc != null) { Object value= cc.getProperty(key); if (value instanceof Boolean) return ((Boolean) value).booleanValue(); } return dflt; }
private boolean isCompareAsText(ICompareInput input, CompareConfiguration cc) { Set set = (Set)cc.getProperty(ICompareAsText.PROP_TEXT_INPUTS); if (set == null) return false; return set.contains(input); }
static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) { if (cc != null) { Object value= cc.getProperty(key); if (value instanceof Boolean) return ((Boolean) value).booleanValue(); } return dflt; }
public static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) { if (cc != null) { Object value= cc.getProperty(key); if (value instanceof Boolean) return ((Boolean) value).booleanValue(); } return dflt; }
/** * Set the saveable part's dirty state to the given state. * @param dirty the dirty state */ protected void setDirty(boolean dirty) { boolean confirmSave= true; Object o= cc.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY); if (o instanceof Boolean) confirmSave= ((Boolean)o).booleanValue(); if (!confirmSave) { fDirty= dirty; if (!fDirty) fDirtyViewers.clear(); } }
/** * Set the saveable part's dirty state to the given state. * @param dirty the dirty state */ protected void setDirty(boolean dirty) { boolean confirmSave= true; Object o= cc.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY); if (o instanceof Boolean) confirmSave= ((Boolean)o).booleanValue(); if (!confirmSave) { fDirty= dirty; if (!fDirty) fDirtyViewers.clear(); } }
/** * Returns the active compare filters for the compare configuration * * @param cc * @return the active compare filters */ public static ICompareFilter[] getCompareFilters(CompareConfiguration cc) { if (cc != null) { Object value = cc.getProperty(ChangeCompareFilterPropertyAction.COMPARE_FILTERS); if (value instanceof Map) { @SuppressWarnings("unchecked") Map<String, ICompareFilter[]> filtersMap = (Map<String, ICompareFilter[]>) value; return filtersMap.values().toArray(new ICompareFilter[filtersMap.size()]); } } return new ICompareFilter[0]; }
protected DefaultMergeEditor createMergeEditor() { @SuppressWarnings("unchecked") Provider<DefaultMergeEditor> mergeEditorProvider = (Provider<DefaultMergeEditor>) getCompareConfiguration() .getProperty(DefaultMergeEditor.PROVIDER); DefaultMergeEditor mergeEditor = mergeEditorProvider.get(); return mergeEditor; }
private boolean isShowStructureInOutlineView() { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); return (object instanceof Boolean && ((Boolean)object).booleanValue()); }
boolean getProperty() { Map filters = (Map) fCompareConfiguration.getProperty(COMPARE_FILTERS); if (filters == null) { filters = new HashMap(); } return filters.containsKey(fCompareFilterDescriptor.getFilterId()); }
private boolean isShowStructureInOutlineView() { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); return object instanceof Boolean && ((Boolean)object).booleanValue(); }
void setProperty(boolean state) { if (fCompareConfiguration != null) { Map filters = new HashMap(); if (fCompareConfiguration.getProperty(COMPARE_FILTERS) != null) { filters.putAll((Map) fCompareConfiguration .getProperty(COMPARE_FILTERS)); } if (state) { filters.put(fCompareFilterDescriptor.getFilterId(), fCompareFilter); } else { filters.remove(fCompareFilterDescriptor.getFilterId()); } fCompareConfiguration.setProperty(COMPARE_FILTERS, filters); } }
/* package */ void internalCompareAsText(Object input) { Set set = (Set)getCompareConfiguration().getProperty(ICompareAsText.PROP_TEXT_INPUTS); if (set == null) { set = new HashSet(); getCompareConfiguration().setProperty(ICompareAsText.PROP_TEXT_INPUTS, set); } set.add(input); if (fContentInputPane.getInput().equals(input)) { // We need to null the input and then reset it so we get the text merge viewer fContentInputPane.setInput(null); fContentInputPane.setInput(input); } }
diff(); } else if (key.equals(ChangeCompareFilterPropertyAction.COMPARE_FILTERS) && getCompareConfiguration().getProperty( ChangeCompareFilterPropertyAction.COMPARE_FILTERS_INITIALIZING) == null) { diff();
public Object getAdapter(Class key) { if (key.equals(IContentOutlinePage.class)) { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); if (object instanceof Boolean && ((Boolean)object).booleanValue()) { if (fOutlinePage != null) { if (fOutlinePage.getControl() != null && fOutlinePage.getControl().isDisposed()) { fOutlinePage = null; } else { return fOutlinePage; } } fOutlinePage= new CompareOutlinePage(this); return fOutlinePage; } } if (key == IShowInSource.class || key == OutlineViewerCreator.class || key == IFindReplaceTarget.class) { Object input = getEditorInput(); if (input != null) { return Utilities.getAdapter(input, key); } } return super.getAdapter(key); }
public <T> T getAdapter(Class<T> key) { if (key.equals(IContentOutlinePage.class)) { Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW); if (object instanceof Boolean && ((Boolean)object).booleanValue()) { if (fOutlinePage != null) {
@Override public void setInput(Object input) { super.setInput(input); if (getViewer() == null || !Utilities.okToUse(getViewer().getControl())) return; ViewerDescriptor[] vd = CompareUIPlugin.getDefault() .findContentViewerDescriptor(getViewer(), getInput(), getCompareConfiguration()); toolBar.setVisible(vd != null && vd.length > 1); CompareConfiguration cc = getCompareConfiguration(); Boolean isOptimized = (Boolean) cc.getProperty(OPTIMIZED_ALGORITHM_USED); boolean optimizedVisible = isOptimized != null && isOptimized.booleanValue(); labelOptimized.setVisible(optimizedVisible); recomputeLink.setVisible(optimizedVisible); }