org.eclipse.ui.browser.IWebBrowser源码实例Demo

类org.eclipse.ui.browser.IWebBrowser源码实例Demo

下面列出了org.eclipse.ui.browser.IWebBrowser 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: codewind-eclipse   文件: CoreUtil.java
public static Control addLinkToDialog(Composite parent, String linkLabel, String linkUrl) {
	Link link = new Link(parent, SWT.WRAP);
	link.setText("<a>" + linkLabel + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent event) {
			try {
				IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
				IWebBrowser browser = browserSupport.getExternalBrowser();
				URL url = new URL(linkUrl);
				browser.openURL(url);
			} catch (Exception e) {
				Logger.logError("An error occurred trying to open an external browser at: " + link, e); //$NON-NLS-1$
			}
		}
	});
	return link;
}
 
源代码2 项目: codewind-eclipse   文件: OpenAppAction.java
public static void openAppInBrowser(CodewindApplication app) {
	URL appRootUrl = app.getRootUrl();
	if (appRootUrl == null) {
		Logger.logError("The application could not be opened in the browser because the url is null: " + app.name); //$NON-NLS-1$
		return;
	}
	try {
		// Use the app's ID as the browser ID so that if this is called again on the same app,
		// the browser will be re-used
		IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
		IWebBrowser browser = browserSupport
				.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.LOCATION_BAR,
						app.projectID, app.name, NLS.bind(Messages.BrowserTooltipApp, app.name));

		browser.openURL(appRootUrl);
	} catch (PartInitException e) {
		Logger.logError("Error opening app in browser", e); //$NON-NLS-1$
	}
}
 
源代码3 项目: xtext-eclipse   文件: OpenBrowserUtil.java
private static void internalOpen(final URL url, final boolean useExternalBrowser) {
	BusyIndicator.showWhile(null, new Runnable() {
		@Override
		public void run() {
			URL helpSystemUrl= PlatformUI.getWorkbench().getHelpSystem().resolve(url.toExternalForm(), true);
			try {
				IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
				IWebBrowser browser;
				if (useExternalBrowser)
					browser= browserSupport.getExternalBrowser();
				else
					browser= browserSupport.createBrowser(null);
				browser.openURL(helpSystemUrl);
			} catch (PartInitException ex) {
			}
		}
	});
}
 
源代码4 项目: APICloud-Studio   文件: WorkbenchBrowserUtil.java
/**
 * Opens an URL with the default settings (which will typically open in an internal browser with no toolbar/url
 * bar/etc).
 * 
 * @param url
 * @return
 */
public static IWebBrowser openURL(String url)
{
	try
	{
		IWorkbenchBrowserSupport workbenchBrowserSupport = PlatformUI.getWorkbench().getBrowserSupport();
		IWebBrowser webBrowser = workbenchBrowserSupport.createBrowser(null);
		if (webBrowser != null)
		{
			webBrowser.openURL(new URL(url));
		}
		return webBrowser;
	}
	catch (Exception e)
	{
		IdeLog.logError(UIPlugin.getDefault(), e);
	}
	return null;
}
 
private static void internalOpen(final URL url, final boolean useExternalBrowser) {
	BusyIndicator.showWhile(null, new Runnable() {
		public void run() {
			URL helpSystemUrl= PlatformUI.getWorkbench().getHelpSystem().resolve(url.toExternalForm(), true);
			if (helpSystemUrl == null) { // can happen if org.eclipse.help.ui is not available
				return; // the resolve() method already wrote "Unable to instantiate help UI" to the log
			}
			try {
				IWorkbenchBrowserSupport browserSupport= PlatformUI.getWorkbench().getBrowserSupport();
				IWebBrowser browser;
				if (useExternalBrowser)
					browser= browserSupport.getExternalBrowser();
				else
					browser= browserSupport.createBrowser(null);
				browser.openURL(helpSystemUrl);
			} catch (PartInitException ex) {
				// XXX: show dialog?
				JavaPlugin.logErrorStatus("Opening Javadoc failed", ex.getStatus()); //$NON-NLS-1$
			}
		}
	});
}
 
源代码6 项目: bonita-studio   文件: GroovyHelpLinkFactory.java
public void createGroovyHelpLink(final Composite parent) {
    final Link docLinkText = new Link(parent, SWT.NONE);
    docLinkText.setText(GROOVY_DOC_LINK);
    docLinkText.addListener(SWT.Selection, new Listener() {

        @Override
        public void handleEvent(final Event event) {

            try {
                final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(GROOVY_BROWSER_ID);
                browser.openURL(new URL(event.text));
            } catch (final Exception e) {
                BonitaStudioLog.error(e);
            }

        }
    });

}
 
源代码7 项目: bonita-studio   文件: OpenApplicationCommand.java
public Object execute(ExecutionEvent event) throws ExecutionException {
    try {
        URL url = getURL();

        IWebBrowser browser;
        browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(IWorkbenchBrowserSupport.AS_EDITOR,
                BonitaPreferenceConstants.APPLICATION_BROWSER_ID, "Bonita Application", "");
        browser.openURL(url);

    } catch (Exception e) {
        BonitaStudioLog.error(e);
        ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                "error",
                "error starting server",
                Status.OK_STATUS);
    }

    return null;
}
 
源代码8 项目: bonita-studio   文件: ShowHelpCommand.java
public Object execute(ExecutionEvent event) throws ExecutionException {
    try {
        Properties globalProperties = PlatformUtil.getStudioGlobalProperties();
        String url = null;
        if (globalProperties != null) {
            url = globalProperties.getProperty(HELP_URL_PROPERTY);
        } else {
            url = "http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=74";
        }
        url = url.concat("&").concat(majorVersion());
        IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport()
                .createBrowser(IWorkbenchBrowserSupport.AS_EDITOR, BonitaPreferenceConstants.HELP_BROWSER_ID, "Quick Start", "");
        browser.openURL(new URL(url));

    } catch (Exception ex) {
        BonitaStudioLog.error(ex);
    }
    return null;
}
 
源代码9 项目: codewind-eclipse   文件: IDEUtil.java
public static void openExternalBrowser(String urlStr) {
	try {
		IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
		IWebBrowser browser = browserSupport.getExternalBrowser();
		URL url = new URL(urlStr);
		browser.openURL(url);
	} catch (Exception e) {
		Logger.logError("An error occurred trying to open an external browser at: " + urlStr, e); //$NON-NLS-1$
	}
}
 
源代码10 项目: statecharts   文件: ExampleModelOpener.java
public void openModelFiles(IProject project) {
	List<IFile> filesToOpen = Lists.newArrayList();
	addStatecharts(project, filesToOpen);

	if (filesToOpen == null || getPage() == null) {
		return;
	}
	Display.getDefault().asyncExec(() -> {
		try {
			for (IFile file : filesToOpen) {
				IDE.openEditor(getPage(), file, false);
			}

			if (online()) {
				String browserid = "org.eclipse.ui.browser.editor";
				String baseURL = "https://itemis.com/en/yakindu/state-machine/documentation/examples/example/";
				URL url = new URL((baseURL + project.getName().replace(".", "-")));
				final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(browserid);
				browser.openURL(url);
			} else {
				openExampleReadme(project);
			}
		} catch (PartInitException | MalformedURLException e) {
			e.printStackTrace();
			return;
		}
	});
}
 
源代码11 项目: gwt-eclipse-plugin   文件: BrowserUtilities.java
public static IWebBrowser launchBrowser(String targetUrl) throws MalformedURLException, PartInitException {
  Workbench workbench = Workbench.getInstance();
  if (workbench == null) {
    throw new PartInitException("No workbench is available");
  }

  IWorkbenchBrowserSupport browserSupport = workbench.getBrowserSupport();

  URL url = new URL(targetUrl);

  IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.AS_EXTERNAL, null, "GWT", "GWT");
  browser.openURL(url);
  return browser;
}
 
源代码12 项目: APICloud-Studio   文件: ShowBrowserEditorAction.java
public void run(IAction action) {
	try {
		IWorkbenchBrowserSupport workbenchBrowserSupport = PlatformUI.getWorkbench().getBrowserSupport();
		if (workbenchBrowserSupport.isInternalWebBrowserAvailable()) {
			IWebBrowser webBrowser = workbenchBrowserSupport.createBrowser(IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.STATUS, null, null, null);
			if (webBrowser != null) {
				webBrowser.openURL(null);
			}
		}
	} catch (PartInitException e) {
		IdeLog.logError(BrowserPlugin.getDefault(), e);
	}
}
 
源代码13 项目: APICloud-Studio   文件: WorkbenchBrowserUtil.java
public static IWebBrowser launchExternalBrowser(String url, String browserId)
{
	try
	{
		return launchExternalBrowser(new URL(url), browserId);
	}
	catch (MalformedURLException e)
	{
		IdeLog.logError(UIPlugin.getDefault(), e);
	}
	return null;
}
 
源代码14 项目: txtUML   文件: Exporter.java
/**
 * Opens visualize.html in the default browser
 * 
 * @throws PartInitException
 * @throws MalformedURLException
 */
private void display() throws PartInitException, MalformedURLException {
	// set to use external browser due to internal browser bug
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=501978
	final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
	browser.openURL(Paths.get(target, FILE_TO_OPEN_IN_BROWSER).toUri().toURL());
}
 
源代码15 项目: translationstudio8   文件: AbstractSelfHelpUI.java
public void displayURL(String url) throws Exception {
	try {
		IWebBrowser browser = getExternalBrowser();
		if (browser != null) {
			browser.openURL(new URL(url));
		}
	} catch (PartInitException pie) {
		ErrorUtil.displayErrorDialog(pie.getLocalizedMessage());
	}
}
 
源代码16 项目: tmxeditor8   文件: AbstractSelfHelpUI.java
public void displayURL(String url) throws Exception {
	try {
		IWebBrowser browser = getExternalBrowser();
		if (browser != null) {
			browser.openURL(new URL(url));
		}
	} catch (PartInitException pie) {
		ErrorUtil.displayErrorDialog(pie.getLocalizedMessage());
	}
}
 
源代码17 项目: tmxeditor8   文件: AbstractSelfHelpUI.java
public void displayURL(String url) throws Exception {
	try {
		IWebBrowser browser = getExternalBrowser();
		if (browser != null) {
			browser.openURL(new URL(url));
		}
	} catch (PartInitException pie) {
		ErrorUtil.displayErrorDialog(pie.getLocalizedMessage());
	}
}
 
源代码18 项目: birt   文件: SystemBrowserAdapter.java
/**
 * Display arbitary url.
 * 
 * @param url
 */
public void displayURL( String url )
{
	// if ( !Program.launch( url ) )
	// {
	//			ViewerPlugin.logError( ViewerPlugin.getFormattedResourceString( "viewer.browser.systemBrowser.noprogramforurl", //$NON-NLS-1$
	// new Object[]{
	// url
	// } ),
	// null );
	// }

	// use WorkbenchBrowserSupport so we needn't to provide browser
	// configuration
	IWorkbenchBrowserSupport support = PlatformUI.getWorkbench( )
			.getBrowserSupport( );
	try
	{
		IWebBrowser browser = support.getExternalBrowser( );
		browser.openURL( new URL( url ) );
	}
	catch ( Exception e )
	{
		ViewerPlugin.logError( ViewerPlugin.getFormattedResourceString( "viewer.browser.systemBrowser.noprogramforurl", //$NON-NLS-1$
				new Object[]{
					url
				} ),
				null );
	}
}
 
源代码19 项目: Pydev   文件: SystemUtils.java
/**
 * Open a webpage in Eclipse's default browser.
 * 
 * @param url URL address of the webpage
 * @param id String id for the newly created browser view
 */
public static void openWebpageInEclipse(URL url, String id) {
    IWebBrowser browser;
    try {
        browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(id);
        browser.openURL(url);
    } catch (Exception e) {
        Log.log(e);
    }
}
 
源代码20 项目: bonita-studio   文件: OpenBrowserOperation.java
protected void openBrowser() throws PartInitException {
    IWebBrowser browser = null;
    WebBrowserUtil.isInternalBrowserOperational = null;
    if (useInternalBrowser &&
            PlatformUI.getWorkbench().getBrowserSupport().isInternalWebBrowserAvailable()) {
        IWorkbenchWindow workbenchWindow = WebBrowserUIPlugin.getInstance().getWorkbench()
                .getActiveWorkbenchWindow();
        final IWorkbenchPage page = workbenchWindow.getActivePage();
        try {
            if (openAsView) {
                openAsView(page);
            } else {
                openAsEditor(page);
            }
        } catch (Exception e) {
            Trace.trace(Trace.SEVERE, "Error opening Web browser", e); //$NON-NLS-1$
        }
    } else if (browserIsSet()) {
        browser = externalBrowser;
        if (browser == null) {
            browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser(
                    IWorkbenchBrowserSupport.AS_EDITOR,
                    TYPE_ID, "", ""); //$NON-NLS-1$
        }
    }
    if (browser != null) {
        browser.openURL(url);
    }
    WebBrowserUtil.isInternalBrowserOperational = false;
    WebBrowserPreference.setBrowserChoice(WebBrowserPreference.EXTERNAL);
}
 
源代码21 项目: bonita-studio   文件: WebBrowserFactory.java
public void openExteranlBrowser(final String urlAsString) throws MalformedURLException {
    final URL url = new URL(urlAsString);
    try {
        final IWebBrowser browser = createExternalBrowser();
        browser.openURL(url);
    } catch (final PartInitException e) {
        BonitaStudioLog.error("Failed to oepn browser to display contract constraint expression help content", e, ContractPlugin.PLUGIN_ID);
    }
}
 
@Override
  public void run() {
      if (conn == null) {
      	// should not be possible
      	Logger.logError("OpenTektonDashboardAction ran but no remote connection was selected"); //$NON-NLS-1$
	return;
}
      
      TektonDashboard tekton = conn.getTektonDashboard();
      if (tekton == null) {
      	// Should not happen since the action should not show if there is no dashboard
      	Logger.logError("OpenTektonDashboardAction ran but there is no tekton dashboard in the environment"); //$NON-NLS-1$
      	return;
      }
      
      if (!tekton.hasTektonDashboard()) {
      	Logger.logError("Tekton dashboard is not available: " + tekton.getTektonMessage()); //$NON-NLS-1$
      	String errorMsg = tekton.isNotInstalled() ? Messages.ActionOpenTektonDashboardNotInstalled : Messages.ActionOpenTektonDashboardOtherError;
      	MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.ActionOpenTektonDashboardErrorDialogTitle, errorMsg);
      	return;
      }

      URL url = tekton.getTektonUrl();
if (url == null) {
	Logger.logError("OpenTektonDashboardAction ran but could not get the url"); //$NON-NLS-1$
	return;
}

try {
	IWebBrowser browser = null;
	IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
	
	if (CoreUtil.isWindows()) {
		// Use the external browser if available since the dashboard does not display 
		// well in the internal browser on Windows
		browser = browserSupport.getExternalBrowser();
	}
	
	if (browser == null) {
		// Use the app's ID as the browser ID so that if this is called again on the same app,
		// the browser will be re-used
		browser = browserSupport
				.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.LOCATION_BAR,
						conn.getConid() + "_tektonDashboard", conn.getName(), NLS.bind(Messages.BrowserTooltipTektonDashboard, conn.getName()));
	}

	browser.openURL(url);
} catch (PartInitException e) {
	Logger.logError("Error opening the Tekton dashboard in browser", e); //$NON-NLS-1$
}
  }
 
源代码23 项目: codewind-eclipse   文件: OpenPerfMonitorAction.java
@Override
  public void run() {
      if (app == null) {
      	// should not be possible
      	Logger.logError("OpenPerformanceMonitorAction ran but no application was selected"); //$NON-NLS-1$
	return;
}

      if (!app.isRunning()) {
      	CoreUtil.openDialog(true, Messages.OpenAppAction_CantOpenNotRunningAppTitle,
      			Messages.OpenAppAction_CantOpenNotRunningAppMsg);
      	return;
      }
      
      if (!app.hasPerfDashboard()) {
      	CoreUtil.openDialog(true, Messages.GenericActionNotSupported, Messages.PerfDashboardNotSupported);
      	return;
      }

      URL url = app.getPerfDashboardUrl();
if (url == null) {
	Logger.logError("OpenPerformanceMonitorAction ran but could not get the url"); //$NON-NLS-1$
	return;
}

try {
	IWebBrowser browser = null;
	IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
	
	if (CoreUtil.isWindows()) {
		// Use the external browser if available since the performance page does not display 
		// well in the internal browser on Windows
		browser = browserSupport.getExternalBrowser();
	}
	
	if (browser == null) {
		// Use the app's ID as the browser ID so that if this is called again on the same app,
		// the browser will be re-used
		browser = browserSupport
				.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.LOCATION_BAR,
						app.projectID + "_" + CoreConstants.PERF_MONITOR, app.name, NLS.bind(Messages.BrowserTooltipPerformanceMonitor, app.name));
	}

	browser.openURL(url);
} catch (PartInitException e) {
	Logger.logError("Error opening the performance dashboard in browser", e); //$NON-NLS-1$
}
  }
 
源代码24 项目: codewind-eclipse   文件: OpenAppMonitorAction.java
@Override
  public void run() {
      if (app == null) {
      	// should not be possible
      	Logger.logError("OpenAppMonitorAction ran but no application was selected"); //$NON-NLS-1$
	return;
}

      if (!app.isRunning()) {
      	CoreUtil.openDialog(true, Messages.OpenAppAction_CantOpenNotRunningAppTitle,
      			Messages.OpenAppAction_CantOpenNotRunningAppMsg);
      	return;
      }

      URL url = app.getMetricsDashboardUrl();
if (url == null) {
	// this should not happen
	Logger.logError("OpenAppMonitorAction ran but could not construct the url"); //$NON-NLS-1$
	return;
}

      app.confirmMetricsAvailable();
      if (!app.hasMetricsDashboard()) {
      	CoreUtil.openDialog(true, Messages.GenericActionNotSupported, Messages.AppMonitorNotSupported);
      	return;
      }

try {
	IWebBrowser browser = null;
	IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
	
	if (CoreUtil.isWindows()) {
		// Use the external browser if available since the page does not display 
		// well in the internal browser on Windows
		browser = browserSupport.getExternalBrowser();
	}
	
	if (browser == null) {
		// Use the app's ID as the browser ID so that if this is called again on the same app,
		// the browser will be re-used
		browser = browserSupport
				.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR | IWorkbenchBrowserSupport.LOCATION_BAR,
						app.projectID + "_" + CoreConstants.VIEW_MONITOR, app.name, NLS.bind(Messages.BrowserTooltipAppMonitor, app.name));
	}

       browser.openURL(url);
} catch (PartInitException e) {
	Logger.logError("Error opening the metrics dashboard in browser", e); //$NON-NLS-1$
}
  }
 
protected void createControl() {
       GridLayout layout = new GridLayout();
       layout.numColumns = 2;
       layout.marginHeight = 20;
	layout.marginWidth = 8;
	layout.horizontalSpacing = 7;
	layout.verticalSpacing = 7;
       this.setLayout(layout);
       
       createLabel(Messages.CodewindConnectionComposite_ConnNameLabel, this, 1);
       connNameText = createConnText(this, SWT.NONE, 1);
      
       createLabel(Messages.CodewindConnectionComposite_UrlLabel, this, 1);
       connURLText = createConnText(this, SWT.NONE, 1);
       
       createLabel(Messages.CodewindConnectionComposite_UserLabel, this, 1);
       connUserText = createConnText(this, SWT.NONE, 1);
       
       createLabel(Messages.CodewindConnectionComposite_PasswordLabel, this, 1);
       connPassText = createConnText(this, SWT.PASSWORD, 1);
       
       new Label(this, SWT.NONE).setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1));
	
	Link learnMoreLink = new Link(this, SWT.NONE);
	learnMoreLink.setText("<a>" + Messages.RegMgmtLearnMoreLink + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
	learnMoreLink.setLayoutData(new GridData(GridData.BEGINNING, GridData.END, false, false, 1, 1));
	
	learnMoreLink.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent event) {
			try {
				IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
				IWebBrowser browser = browserSupport.getExternalBrowser();
				URL url = new URL(UIConstants.REMOTE_SETUP_URL);
				browser.openURL(url);
			} catch (Exception e) {
				Logger.logError("An error occurred trying to open an external browser at: " + UIConstants.TEMPLATES_INFO_URL, e); //$NON-NLS-1$
			}
		}
	});

	// Add Context Sensitive Help
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, CodewindUIPlugin.MAIN_CONTEXTID);

       initialize();
       connNameText.setFocus();
}
 
源代码26 项目: sarl   文件: IssueInformationPage.java
@Override
public void createControl(Composite parent) {
	// create a composite with standard margins and spacing
	final Composite composite = new Composite(parent, SWT.NONE);
	final GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	composite.setLayout(layout);
	composite.setLayoutData(new GridData(GridData.FILL_BOTH));

	if (this.link != null) {
		final Link linkWidget = new Link(composite, SWT.BORDER);
		linkWidget.setText(MessageFormat.format(Messages.IssueInformationPage_9, this.link.toString()));
		linkWidget.setFont(composite.getFont());
		final GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		gd.horizontalSpan = 2;
		linkWidget.setLayoutData(gd);
		linkWidget.addSelectionListener(new SelectionAdapter() {
			@SuppressWarnings("synthetic-access")
			@Override
			public void widgetSelected(SelectionEvent event) {
				try {
					final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
					browser.openURL(IssueInformationPage.this.link);
					final IWizard wizard = IssueInformationPage.this.getWizard();
					if (wizard instanceof SubmitEclipseLogWizard) {
						final WizardDialog dialog = ((SubmitEclipseLogWizard) wizard).getWizardDialog();
						if (dialog != null) {
							dialog.close();
						}
					}
				} catch (PartInitException e) {
					//
				}
			}
		});
	}

	SWTFactory.createLabel(composite, Messages.IssueInformationPage_1, 1);
	this.titleField = SWTFactory.createSingleText(composite, 1);

	SWTFactory.createLabel(composite, Messages.IssueInformationPage_2, 1);
	this.descriptionField = SWTFactory.createText(composite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL, 1);
	this.descriptionField.setLayoutData(new GridData(GridData.FILL_BOTH));

	SWTFactory.createLabel(composite, Messages.IssueInformationPage_3, 1);
	this.trackerLogin = SWTFactory.createSingleText(composite, 1);

	SWTFactory.createLabel(composite, Messages.IssueInformationPage_4, 1);
	this.trackerPassword = SWTFactory.createSingleText(composite, 1);
	this.trackerPassword.setEchoChar(ECHO_CHAR);

	//add the listeners now to prevent them from monkeying with initialized settings
	this.titleField.addModifyListener(listeningEvent -> {
		updatePageStatus();
	});
	this.descriptionField.addModifyListener(listeningEvent -> {
		updatePageStatus();
	});
	this.trackerLogin.addModifyListener(listeningEvent -> {
		updatePageStatus();
	});
	this.trackerPassword.addModifyListener(listeningEvent -> {
		updatePageStatus();
	});

	Dialog.applyDialogFont(composite);
	setControl(composite);

	initFields();
	updatePageStatus();
}
 
源代码27 项目: translationstudio8   文件: AbstractSelfHelpUI.java
private IWebBrowser getExternalBrowser() throws PartInitException {
	IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
	return support.getExternalBrowser();
}
 
源代码28 项目: tmxeditor8   文件: AbstractSelfHelpUI.java
private IWebBrowser getExternalBrowser() throws PartInitException {
	IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
	return support.getExternalBrowser();
}
 
源代码29 项目: tmxeditor8   文件: AbstractSelfHelpUI.java
private IWebBrowser getExternalBrowser() throws PartInitException {
	IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
	return support.getExternalBrowser();
}
 
源代码30 项目: birt   文件: BrowserAccessor.java
private IWebBrowser getExternalBrowser( ) throws PartInitException
{
	IWorkbenchBrowserSupport support = PlatformUI.getWorkbench( )
			.getBrowserSupport( );
	return support.getExternalBrowser( );
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法