/** * For testing only * * @return true if the trigger is enabled * @noreference */ public boolean isTriggerEnabled() { return link != null && !link.isDisposed() && link.isEnabled(); }
/** * Opens the dialog tray (support area at the right side of the dialog) */ @Override public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException { if (launchTrayLink != null && !launchTrayLink.isDisposed()) { launchTrayLink.setEnabled(false); } if (providesSupport()) { super.openTray(tray); } dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.TRUE); }
private void updateLinkVisibility() { if (fChangeWorkspaceSettings == null || fChangeWorkspaceSettings.isDisposed()) { return; } if (isProjectPreferencePage()) { fChangeWorkspaceSettings.setEnabled(!useProjectSettings()); } }
private void updateLinkVisibility() { if (fChangeWorkspaceSettings == null || fChangeWorkspaceSettings.isDisposed()) { return; } if (isProjectPreferencePage()) { fChangeWorkspaceSettings.setEnabled(!useProjectSettings()); } }
private void updateLinkVisibility() { if (changeWorkspaceSettings == null || changeWorkspaceSettings.isDisposed()) { return; } if (isProjectPreferencePage()) { changeWorkspaceSettings.setEnabled(!useProjectSettings()); } }
@Override void enableWidget (boolean enabled) { super.enableWidget (enabled); if (isDisposed ()) return; styleLinkParts(); redraw (); }
@Override void enableWidget (boolean enabled) { super.enableWidget (enabled); if (isDisposed ()) return; styleLinkParts(); redraw (); }
private void updateLinkVisibility() { if (fChangeWorkspaceSettings == null || fChangeWorkspaceSettings.isDisposed()) { return; } if (isProjectPreferencePage()) { fChangeWorkspaceSettings.setEnabled(!useProjectSettings()); } }
@Override void enableWidget (boolean enabled) { super.enableWidget (enabled); if (isDisposed ()) return; styleLinkParts(); redraw (); }
@Override public void closeTray() throws IllegalStateException { if (getTray() != null) { super.closeTray(); } //preserve state during modality switch if (!getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH)) { dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.FALSE); } if (launchTrayLink != null && !launchTrayLink.isDisposed()) { launchTrayLink.setEnabled(providesSupport() && !getBooleanValue(IStatusDialogConstants.TRAY_OPENED)); } }
boolean textView_clickOnLink_atIndex(long /*int*/ id, long /*int*/ sel, long /*int*/ textView, long /*int*/ link, long /*int*/ charIndex) { NSString str = new NSString (link); Event event = new Event (); event.text = str.getString(); sendSelectionEvent (SWT.Selection, event, true); // Widget may be disposed at this point. if (isDisposed()) return true; for (int i = 0; i < offsets.length; i++) { if ((charIndex >= offsets[i].x) && (charIndex <= offsets[i].y)) { focusIndex = i; break; } } redrawWidget(view, false); ignoreNextMouseUp = true; return true; }
/** * Update the trigger key if either action is available and enabled or * command is available * * @param trigger * {@link Object} or <code>null</code> * @param link */ private void updateTrigger(Object trigger, Link link) { if (link.isDisposed()) { return; } if (trigger instanceof IAction && ((IAction) trigger).isEnabled()) { link.setData(TRIGGER_KEY, trigger); } else if (trigger instanceof ParameterizedCommand) { link.setData(TRIGGER_KEY, trigger); hookTriggerCommandEnablement(); } else { link.setData(TRIGGER_KEY, null); } }
if (launchTrayLink == null || launchTrayLink.isDisposed()) { launchTrayLink = createGetSupportLink(); .setEnabled(!getBooleanValue(IStatusDialogConstants.TRAY_OPENED)); } else { if (launchTrayLink != null && !launchTrayLink.isDisposed()) { launchTrayLink.dispose(); launchTrayLink = null; if (showErrorLogLink == null || showErrorLogLink.isDisposed()) { showErrorLogLink = createShowErrorLogLink(); if (showErrorLogLink != null && !showErrorLogLink.isDisposed()) { showErrorLogLink.dispose();
if (link.isDisposed()) { return;
private void validateComplianceStatus() { if (fJRE50InfoText != null && !fJRE50InfoText.isDisposed()) { boolean isVisible= false;
private void validateJRE50Status() { if (fJRE50InfoText != null && !fJRE50InfoText.isDisposed()) { boolean isVisible= false; String compliance= getStoredValue(PREF_COMPLIANCE); // get actual value IVMInstall install= null; if (fProject != null) { // project specific settings: only test if a 50 JRE is installed try { install= JavaRuntime.getVMInstall(JavaCore.create(fProject)); } catch (CoreException e) { JavaPlugin.log(e); } } else { install= JavaRuntime.getDefaultVMInstall(); } if (install instanceof IVMInstall2) { String compilerCompliance= JavaModelUtil.getCompilerCompliance((IVMInstall2) install, compliance); if (JavaModelUtil.isVersionLessThan(compilerCompliance, compliance)) { // Discourage using compiler with version less than compliance String[] args= { getVersionLabel(compliance), getVersionLabel(compilerCompliance) }; if (fProject == null) { fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info, args)); } else { fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info_project, args)); } isVisible= true; } } fJRE50InfoText.setVisible(isVisible); } }
private void validateComplianceStatus() { if (fJRE50InfoText != null && !fJRE50InfoText.isDisposed()) { boolean isVisible= false; Image image= JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);