private boolean getMRUValue(Control control) { if (CSSPropertyMruVisibleSWTHandler.isMRUControlledByCSS()) { return getInitialMRUValue(control); } return getMRUValueFromPreferences(); }
public Object createWidget(MUIElement element, Object parent) { if (!(element instanceof MPartStack) || !(parent instanceof Composite)) return null; Composite parentComposite = (Composite) parent; // Ensure that all rendered PartStacks have an Id if (element.getElementId() == null || element.getElementId().length() == 0) { String generatedId = "PartStack@" + Integer.toHexString(element.hashCode()); //$NON-NLS-1$ element.setElementId(generatedId); } // TBD: need to define attributes to handle this final CTabFolder ctf = new CTabFolder(parentComposite, SWT.BORDER); ctf.setMRUVisible(getInitialMRUValue(ctf)); // Adjust the minimum chars based on the location int location = modelService.getElementLocation(element); if ((location & EModelService.IN_SHARED_AREA) != 0) { ctf.setMinimumCharacters(MIN_EDITOR_CHARS); ctf.setUnselectedCloseVisible(true); } else { ctf.setMinimumCharacters(MIN_VIEW_CHARS); ctf.setUnselectedCloseVisible(false); } bindWidget(element, ctf); // ?? Do we need this ? // Add a composite to manage the view's TB and Menu addTopRight(ctf); return ctf; }
ctxt.get(EPartService.class), stack, this, (ISWTResourceUtilities) ctxt.get(IResourceUtilities.class), getInitialMRUValue(ctf)); editorList.setInput();