mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Bug 437560 - Add new API to return contents of text field
Change-Id: Ib14c69752e61ee7e03c37834f16923b5b41f16ef Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
1ab074695f
commit
3860c54cc0
11 changed files with 40 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.remote.ui;singleton:=true
|
Bundle-SymbolicName: org.eclipse.remote.ui;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.1.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.remote.internal.ui.RemoteUIPlugin
|
Bundle-Activator: org.eclipse.remote.internal.ui.RemoteUIPlugin
|
||||||
Bundle-Vendor: %pluginProvider
|
Bundle-Vendor: %pluginProvider
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.remote.ui</artifactId>
|
<artifactId>org.eclipse.remote.ui</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -219,8 +219,8 @@ public class RemoteResourceBrowser extends Dialog implements IRunnableContext {
|
||||||
* @return selected resource or null if no resource is selected
|
* @return selected resource or null if no resource is selected
|
||||||
*/
|
*/
|
||||||
public IFileStore getResource() {
|
public IFileStore getResource() {
|
||||||
if (fResourceBrowserWidget != null && fResourceBrowserWidget.getResources().size() > 0) {
|
if (fResourceBrowserWidget != null) {
|
||||||
return fResourceBrowserWidget.getResources().get(0);
|
return fResourceBrowserWidget.getResource();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,8 @@ import org.eclipse.remote.internal.ui.messages.Messages;
|
||||||
import org.eclipse.remote.ui.IRemoteUIConnectionManager;
|
import org.eclipse.remote.ui.IRemoteUIConnectionManager;
|
||||||
import org.eclipse.remote.ui.RemoteUIServices;
|
import org.eclipse.remote.ui.RemoteUIServices;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.events.ModifyEvent;
|
||||||
|
import org.eclipse.swt.events.ModifyListener;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
@ -166,6 +168,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
*/
|
*/
|
||||||
public static final int SHOW_CONNECTIONS = 0x40;
|
public static final int SHOW_CONNECTIONS = 0x40;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private static final int minimumWidth = 200;
|
private static final int minimumWidth = 200;
|
||||||
private static final int heightHint = 300;
|
private static final int heightHint = 300;
|
||||||
|
|
||||||
|
@ -181,6 +184,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
|
|
||||||
private boolean fShowHidden;
|
private boolean fShowHidden;
|
||||||
private final List<IFileStore> fResources = new ArrayList<IFileStore>();
|
private final List<IFileStore> fResources = new ArrayList<IFileStore>();
|
||||||
|
private String fResource;
|
||||||
private String fInitialPath;
|
private String fInitialPath;
|
||||||
private IPath fRootPath;
|
private IPath fRootPath;
|
||||||
private IRemoteFileManager fFileMgr;
|
private IRemoteFileManager fFileMgr;
|
||||||
|
@ -249,6 +253,12 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
setRoot(fRemotePathText.getText());
|
setRoot(fRemotePathText.getText());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
fRemotePathText.addModifyListener(new ModifyListener() {
|
||||||
|
@Override
|
||||||
|
public void modifyText(ModifyEvent e) {
|
||||||
|
fResource = fRemotePathText.getText().trim();
|
||||||
|
}
|
||||||
|
});
|
||||||
GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
||||||
// gd.minimumWidth = minimumWidth;
|
// gd.minimumWidth = minimumWidth;
|
||||||
fRemotePathText.setLayoutData(gd);
|
fRemotePathText.setLayoutData(gd);
|
||||||
|
@ -584,6 +594,21 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
return fConnection;
|
return fConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a resource that corresponds to the text field
|
||||||
|
*
|
||||||
|
* @return resource corresponding to the text field
|
||||||
|
* @since 1.1
|
||||||
|
*/
|
||||||
|
public IFileStore getResource() {
|
||||||
|
if (fResource != null) {
|
||||||
|
if (!fResource.equals("") && getConnection() != null) { //$NON-NLS-1$
|
||||||
|
return getConnection().getFileManager().getResource(fResource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the resources that were selected.
|
* Get the resources that were selected.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.remote"
|
id="org.eclipse.remote"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="1.0.1.qualifier"
|
version="1.1.0.qualifier"
|
||||||
provider-name="%providerName"
|
provider-name="%providerName"
|
||||||
license-feature="org.eclipse.license"
|
license-feature="org.eclipse.license"
|
||||||
license-feature-version="0.0.0">
|
license-feature-version="0.0.0">
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.remote</artifactId>
|
<artifactId>org.eclipse.remote</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Remote Parent</name>
|
<name>Remote Parent</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<remote-release>1.0.1</remote-release>
|
<remote-release>1.1.0</remote-release>
|
||||||
<eclipse-release>luna</eclipse-release>
|
<eclipse-release>luna</eclipse-release>
|
||||||
<tycho-version>0.20.0</tycho-version>
|
<tycho-version>0.20.0</tycho-version>
|
||||||
<tycho-extras-version>${tycho-version}</tycho-extras-version>
|
<tycho-extras-version>${tycho-version}</tycho-extras-version>
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.remote</groupId>
|
<groupId>org.eclipse.remote</groupId>
|
||||||
<artifactId>remote-parent</artifactId>
|
<artifactId>remote-parent</artifactId>
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
<relativePath>../../releng/org.eclipse.remote.build/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.0.1-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.remote.repo</artifactId>
|
<artifactId>org.eclipse.remote.repo</artifactId>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue