Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions org.sofproject.gst.topo/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Require-Bundle: org.sofproject.core,
org.sofproject.ui,
org.sofproject.topo.ui,
com.jcraft.jsch
Export-Package: org.sofproject.gst.topo
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@

public interface IGstNodeConst {
String GST_NODE_CORE_ID = "org.sofproject.gst.topo";
String GST_NODE_PREFERENCES_ID = "org.sofproject.ui.preferences";

String GST_NODE_EXTENSION_ID = GST_NODE_CORE_ID + ".gstextension";

String GST_PROJ_DEFAULT_GST_INSPECT_TOOL_CMD = "gst-inspect-1.0";
String GST_PROJ_DEFAULT_GST_LAUNCH_TOOL_CMD = "gst-launch-1.0";

String GST_PROJ_PROP_GST_INSPECT_TOOL_CMD = "gstInspectToolCmd";
String GST_PROJ_PROP_GST_LAUNCH_TOOL_CMD = "gstLaunchToolCmd";

String CONN_ADDR_PREF_NAME = "connAddress";
String CONN_USERNAME_PREF_NAME = "connUsername";
}
3 changes: 2 additions & 1 deletion org.sofproject.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ Export-Package: org.sofproject.ui.editor,
org.sofproject.ui.properties,
org.sofproject.ui.wizards
Bundle-Vendor: Intel Corporation
Import-Package: com.google.common.collect;version="21.0.0"
Import-Package: com.google.common.collect;version="21.0.0",
org.sofproject.gst.topo
7 changes: 7 additions & 0 deletions org.sofproject.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,11 @@
name="Audio Development">
</perspective>
</extension>
<extension
point = "org.eclipse.ui.preferencePages">
<page id="org.sofproject.ui.preferences.connectionpreferences"
class="org.sofproject.ui.preferences.ConnectionPreferences"
name="Connection">
</page>
</extension>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

package org.sofproject.ui.handlers;

import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
Expand All @@ -38,6 +39,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.sofproject.gst.topo.IGstNodeConst;

public class AudioDevNodeLoginDialog extends TrayDialog {

Expand Down Expand Up @@ -89,13 +91,14 @@ protected Control createDialogArea(Composite parent) {
data.grabExcessHorizontalSpace = true;
loginField = new Text(loginGroup, SWT.BORDER);
loginField.setLayoutData(data);
loginField.setText(Platform.getPreferencesService().getString(IGstNodeConst.GST_NODE_PREFERENCES_ID,
IGstNodeConst.CONN_USERNAME_PREF_NAME, "", null));

new Label(loginGroup, SWT.NONE).setText("Password");
data = new GridData(GridData.FILL_HORIZONTAL);
data.grabExcessHorizontalSpace = true;
passField = new Text(loginGroup, SWT.PASSWORD | SWT.BORDER);
passField.setLayoutData(data);

loginField.setFocus();

return container;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright (c) 2019, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Intel Corporation nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/

package org.sofproject.ui.preferences;

import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import org.sofproject.gst.topo.IGstNodeConst;

public class ConnectionPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

private StringFieldEditor ipFieldEditor;
private StringFieldEditor userFieldEditor;

@Override
public void init(IWorkbench workbench) {
IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE,
IGstNodeConst.GST_NODE_PREFERENCES_ID);
setPreferenceStore(store);

}

@Override
protected void createFieldEditors() {
ipFieldEditor = new StringFieldEditor(IGstNodeConst.CONN_ADDR_PREF_NAME, "Last address for Dev projects ",
getFieldEditorParent());
addField(ipFieldEditor);

userFieldEditor = new StringFieldEditor(IGstNodeConst.CONN_USERNAME_PREF_NAME, "Last login name for Dev projects: ",
getFieldEditorParent());
addField(userFieldEditor);

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

package org.sofproject.ui.wizards;

import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
Expand All @@ -39,6 +40,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.sofproject.core.AudioDevNodeProject;
import org.sofproject.gst.topo.IGstNodeConst;

public class NewAudioDevNodeCreationPage extends WizardNewProjectCreationPage {

Expand Down Expand Up @@ -75,6 +77,8 @@ public void createControl(Composite parent) {
addr = new Text(addrGroup, SWT.BORDER);
addr.setLayoutData(data);
addr.addListener(SWT.Modify, confModifyListener);
addr.setText(Platform.getPreferencesService().getString(IGstNodeConst.GST_NODE_PREFERENCES_ID,
IGstNodeConst.CONN_ADDR_PREF_NAME, "", null));
}

@Override
Expand Down