Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 89339 Details for
Bug 217333
MainTab's Location should be hyperlinked
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.pde.ui.patch
clipboard.txt (text/plain), 8.95 KB, created by
Benjamin Cabé
on 2008-02-09 11:36:26 EST
(
hide
)
Description:
org.eclipse.pde.ui.patch
Filename:
MIME Type:
Creator:
Benjamin Cabé
Created:
2008-02-09 11:36:26 EST
Size:
8.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/pderesources.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties,v >retrieving revision 1.964 >diff -u -r1.964 pderesources.properties >--- src/org/eclipse/pde/internal/ui/pderesources.properties 4 Feb 2008 16:43:29 -0000 1.964 >+++ src/org/eclipse/pde/internal/ui/pderesources.properties 9 Feb 2008 16:33:22 -0000 >@@ -441,6 +441,12 @@ > BaseBlock_variablesS=Variable&s... > BaseBlock_dirChoose=Choose a directory: > BaseBlock_relative=Choose a location relative to the workspace: >+BaseBlock_fileTitle=Open file >+BaseBlock_fileNotFoundMessage=The specified file could not be found. >+BaseBlock_fileErrorMessage=The specified file could not be opened. >+BaseBlock_directoryTitle=Open directory >+BaseBlock_directoryNotFoundMessage=The specified directory could not be found. >+BaseBlock_directoryErrorMessage=The specified directory could not be opened. > ProgramBlock_runProduct=Run a &product: > ProgramBlock_programToRun=Program to Run > ProgramBlock_runApplication=Run an &application: >Index: src/org/eclipse/pde/internal/ui/PDEUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java,v >retrieving revision 1.356 >diff -u -r1.356 PDEUIMessages.java >--- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 31 Jan 2008 23:26:27 -0000 1.356 >+++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 9 Feb 2008 16:33:20 -0000 >@@ -2374,6 +2374,18 @@ > > public static String BaseBlock_errorMessage; > >+ public static String BaseBlock_fileTitle; >+ >+ public static String BaseBlock_fileNotFoundMessage; >+ >+ public static String BaseBlock_fileErrorMessage; >+ >+ public static String BaseBlock_directoryTitle; >+ >+ public static String BaseBlock_directoryNotFoundMessage; >+ >+ public static String BaseBlock_directoryErrorMessage; >+ > public static String ConfigurationTemplateBlock_name; > > public static String WorkspaceDataBlock_name; >Index: src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java,v >retrieving revision 1.11 >diff -u -r1.11 ConfigurationTemplateBlock.java >--- src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java 6 Feb 2008 15:58:13 -0000 1.11 >+++ src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java 9 Feb 2008 16:33:22 -0000 >@@ -112,6 +112,10 @@ > return PDEUIMessages.ConfigurationTemplateBlock_name; > } > >+ protected boolean isFile() { >+ return true; >+ } >+ > protected void handleBrowseWorkspace() { > ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(fTab.getControl().getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider()); > >Index: src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java,v >retrieving revision 1.11 >diff -u -r1.11 WorkspaceDataBlock.java >--- src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java 16 Jan 2008 17:08:31 -0000 1.11 >+++ src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java 9 Feb 2008 16:33:22 -0000 >@@ -125,6 +125,10 @@ > return PDEUIMessages.WorkspaceDataBlock_name; > } > >+ protected boolean isFile() { >+ return false; >+ } >+ > protected void handleBrowseWorkspace() { > super.handleBrowseWorkspace(); > if (fClearWorkspaceCheck.getSelection()) >Index: src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java,v >retrieving revision 1.11 >diff -u -r1.11 BaseBlock.java >--- src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java 16 Jan 2008 17:08:31 -0000 1.11 >+++ src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java 9 Feb 2008 16:33:22 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,22 +7,27 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Benjamin Cabe - bug 217333 > *******************************************************************************/ > package org.eclipse.pde.internal.ui.launcher; > >+import java.io.File; > import org.eclipse.core.resources.*; > import org.eclipse.core.runtime.*; > import org.eclipse.core.variables.IStringVariableManager; > import org.eclipse.core.variables.VariablesPlugin; > import org.eclipse.debug.ui.StringVariableSelectionDialog; >+import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.window.Window; > import org.eclipse.osgi.util.NLS; >+import org.eclipse.pde.internal.ui.PDEPlugin; > import org.eclipse.pde.internal.ui.PDEUIMessages; > import org.eclipse.pde.internal.ui.util.SWTUtil; > import org.eclipse.pde.ui.launcher.AbstractLauncherTab; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.*; > import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.program.Program; > import org.eclipse.swt.widgets.*; > import org.eclipse.ui.dialogs.ContainerSelectionDialog; > >@@ -38,7 +43,7 @@ > > protected Listener fListener = new Listener(); > >- protected Label fLocationLabel; >+ protected Link fLocationLink; > > class Listener extends SelectionAdapter implements ModifyListener { > public void widgetSelected(SelectionEvent e) { >@@ -64,12 +69,12 @@ > } > > protected void createText(Composite parent, String text, int indent) { >- fLocationLabel = new Label(parent, SWT.NONE); >- fLocationLabel.setText(text); >+ fLocationLink = new Link(parent, SWT.NONE); >+ fLocationLink.setText("<a>" + text + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$ > if (indent > 0) { > GridData gd = new GridData(); > gd.horizontalIndent = indent; >- fLocationLabel.setLayoutData(gd); >+ fLocationLink.setLayoutData(gd); > } > > fLocationText = new Text(parent, SWT.SINGLE | SWT.BORDER); >@@ -77,6 +82,22 @@ > gd.widthHint = 400; > fLocationText.setLayoutData(gd); > fLocationText.addModifyListener(fListener); >+ >+ fLocationLink.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ try { >+ String path = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(getLocation(), false); >+ File f = new File(path); >+ if (f.exists()) >+ Program.launch(f.getCanonicalPath()); >+ else >+ MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), isFile() ? PDEUIMessages.BaseBlock_fileTitle : PDEUIMessages.BaseBlock_directoryTitle, isFile() ? PDEUIMessages.BaseBlock_fileNotFoundMessage : PDEUIMessages.BaseBlock_directoryNotFoundMessage); // >+ } catch (Exception ex) { >+ MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), isFile() ? PDEUIMessages.BaseBlock_fileTitle : PDEUIMessages.BaseBlock_directoryTitle, isFile() ? PDEUIMessages.BaseBlock_fileErrorMessage : PDEUIMessages.BaseBlock_directoryErrorMessage); // >+ } >+ } >+ }); >+ > } > > protected void createButtons(Composite parent, String[] buttonLabels) { >@@ -155,8 +176,13 @@ > > protected abstract String getName(); > >+ /** >+ * @return true if the block edits a file, false otherwise (i.e. directory) >+ */ >+ protected abstract boolean isFile(); >+ > protected void enableBrowseSection(boolean enabled) { >- fLocationLabel.setEnabled(enabled); >+ fLocationLink.setEnabled(enabled); > fLocationText.setEnabled(enabled); > fFileSystemButton.setEnabled(enabled); > fWorkspaceButton.setEnabled(enabled); >Index: src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java,v >retrieving revision 1.12 >diff -u -r1.12 ConfigurationAreaBlock.java >--- src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java 6 Feb 2008 15:58:13 -0000 1.12 >+++ src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java 9 Feb 2008 16:33:22 -0000 >@@ -114,6 +114,10 @@ > return PDEUIMessages.ConfigurationAreaBlock_name; > } > >+ protected boolean isFile() { >+ return false; >+ } >+ > public String validate() { > if (fUseDefaultLocationButton.getSelection()) > return null;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217333
:
89338
| 89339 |
89340