// The shared instance
private static ConnectionPlugin plugin;
- private IDevice mCurrentDevice;
- private final ArrayList<ISelectionListener> mListeners = new ArrayList<ISelectionListener>();
+ private IDevice currentDevice;
+ private final ArrayList<ISelectionListener> listeners = new ArrayList<ISelectionListener>();
public int OS;
public final int LINUX = 0;
public final int WINDOWS = 1;
/**
- * Classes which implement this interface provide methods that deals
- * with {@link IDevice} and {@link Client} selectionchanges.
+ * Implements for FileEntry changed status.
*/
public interface ISelectionListener {
/**
- * Sent when a new {@link IDevice} is selected.
- * @param selectedDevice the selected device. If null, no devices are selected.
+ * Sent when a FileEntry is selected.
+ * @param selectedEntry the selected FileEntry. If null, no FileEntry are selected.
*/
public void selectionChanged(FileEntry selectedEntry);
}
+
/**
* The constructor
*/
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
+
super.start(context);
plugin = this;
else
this.OS = this.LINUX;
-// AndroidDebugBridge.init(false);
-// AndroidDebugBridge.createBridge("/home/mustafa/mywork/source/sdb/bin/adb",true);
-
- // get the eclipse store
-// final IPreferenceStore eclipseStore = getPreferenceStore();
-
- //AndroidDebugBridge.addDeviceChangeListener(this);
-
-// DdmUiPreferences.setStore(eclipseStore);
-
-// DeviceMonitor monitor = new DeviceMonitor();
-// monitor.processDeviceData();
-
-
}
+
public static synchronized List<DebugTool> getDebugTools(IDevice device) {
+
List<DebugTool> toolLists = new ArrayList<DebugTool>();
IExtensionRegistry x = RegistryFactory.getRegistry();
}
return toolLists;
}
+
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
public void setCurrentDevice( IDevice device )
{
- mCurrentDevice = device;
+ currentDevice = device;
}
public IDevice getCurrentDevice()
{
- return mCurrentDevice;
+ return currentDevice;
}
public void addSelectionListener(ISelectionListener listener) {
- mListeners.add(listener);
+ listeners.add(listener);
}
public void removeSelectionListener(ISelectionListener listener) {
- mListeners.remove(listener);
+ listeners.remove(listener);
}
public void notifySelectionListeners(FileEntry file) {
- ISelectionListener[] mlistenersCopy = mListeners.toArray(
- new ISelectionListener[mListeners.size()]);
+ ISelectionListener[] listenersCopy = listeners.toArray(
+ new ISelectionListener[listeners.size()]);
- for (ISelectionListener listener : mlistenersCopy)
+ for (ISelectionListener listener : listenersCopy)
{
- // notify the listener with a try/catch-all to make sure this thread won't die
- // because of an uncaught exception before all the listeners were notified.
-
try
{
listener.selectionChanged( file );
}
}
}
+
/**
* Returns an image descriptor for the image file at the given
* plug-in relative path
public class ConnectionExplorerContentProvider implements ITreeContentProvider {
- private TreeViewer mViewer;
-// private FileListingService mFileListingService;
- private FileEntry mRootEntry;
+ private TreeViewer viewer;
+ private FileEntry rootEntry;
- private IListingReceiver sListingReceiver = new IListingReceiver() {
+ private IListingReceiver listingReceiver = new IListingReceiver() {
public void setChildren(final FileEntry entry, FileEntry[] children) {
- final Tree t = mViewer.getTree();
+ final Tree t = viewer.getTree();
if (t != null && t.isDisposed() == false) {
Display display = t.getDisplay();
if (display.isDisposed() == false) {
public void run() {
if (t.isDisposed() == false) {
// refresh the entry.
- mViewer.refresh(entry);
-
- // force it open, since on linux and windows
- // when getChildren() returns null, the node is
- // not considered expanded.
- mViewer.setExpandedState(entry, true);
+ viewer.refresh(entry);
+ viewer.setExpandedState(entry, true);
}
}
});
}
public void refreshEntry(final FileEntry entry) {
- final Tree t = mViewer.getTree();
+ final Tree t = viewer.getTree();
if (t != null && t.isDisposed() == false) {
Display display = t.getDisplay();
if (display.isDisposed() == false) {
public void run() {
if (t.isDisposed() == false) {
// refresh the entry.
- mViewer.refresh(entry);
+ viewer.refresh(entry);
}
}
});
@Override
public void dispose() {
- // TODO Auto-generated method stub
-
}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (viewer instanceof TreeViewer) {
- mViewer = (TreeViewer)viewer;
+ this.viewer = (TreeViewer)viewer;
}
if (newInput instanceof FileEntry) {
- mRootEntry = (FileEntry)newInput;
+ rootEntry = (FileEntry)newInput;
}
}
Object[] oldEntries = parentEntry.getCachedChildren();
Object[] newEntries = parentEntry.getFileListingService().getChildren(parentEntry,
- true, sListingReceiver);
+ true, listingReceiver);
if (newEntries != null) {
return newEntries;
} else {
- // if null was returned, this means the cache was not valid,
- // and a thread was launched for ls. sListingReceiver will be
- // notified with the new entries.
return oldEntries;
}
}
FileEntry[] entries = new FileEntry[ devices.length ];
for( int i = 0; i < devices.length ; i++)
{
-// setListingService(devices[i].getFileListingService());
-// if (devices[i].isEmulator())
-// {
-// entries[i] = new FileEntry( null, devices[i].getSerialNumber(), FileListingService.TYPE_ROOT_EMULATOR, true, devices[i].getFileListingService());
-// }
-// else
-// entries[i] = new FileEntry( null, devices[i].getSerialNumber(), FileListingService.TYPE_ROOT_DEVICE, true, devices[i].getFileListingService());
entries[i] = devices[i].getFileListingService().getRoot();
-
-
}
return entries;
}
public class ConnectionExplorerLabelProvider implements ITableLabelProvider {
- private Image mFileImage;
- private Image mFolderImage;
- private Image mFileLinkImage;
- private Image mFolderLinkImage;
- private Image mOtherImage;
- private Image mEmulatorImage;
- private Image mDeviceImage;
+ private Image fileImage;
+ private Image folderImage;
+ private Image fileLinkImage;
+ private Image folderLinkImage;
+ private Image otherImage;
+ private Image emulatorImage;
+ private Image deviceImage;
public static int index;
- /**
- * Creates Label provider with custom images.
- *
- * @param fileImage
- * the Image to represent a file
- * @param folderImage
- * the Image to represent a folder
- * @param packageImage
- * the Image to represent a .apk file. If null, fileImage
- * is used instead.
- * @param otherImage
- * the Image to represent all other entry type.
- */
+
public ConnectionExplorerLabelProvider(Display display) {
ImageLoader loader = ImageLoader.getDdmUiLibLoader();
- mFileImage = loader.loadImage("file.gif", display);
- mFolderImage = loader.loadImage("directory.gif", display);
- mFileLinkImage = loader.loadImage("file_link.gif", display);
- mFolderLinkImage = loader.loadImage("directory_link.gif", display);
- mOtherImage = loader.loadImage("file.gif", display);
- mEmulatorImage = loader.loadImage("emulator.gif", display);
- mDeviceImage = loader.loadImage("device.gif", display);
+ fileImage = loader.loadImage("file.gif", display);
+ folderImage = loader.loadImage("directory.gif", display);
+ fileLinkImage = loader.loadImage("file_link.gif", display);
+ folderLinkImage = loader.loadImage("directory_link.gif", display);
+ otherImage = loader.loadImage("file.gif", display);
+ emulatorImage = loader.loadImage("emulator.gif", display);
+ deviceImage = loader.loadImage("device.gif", display);
}
@Override
FileEntry entry = (FileEntry) element;
switch (entry.getType()) {
case FileListingService.TYPE_FILE:
- return mFileImage;
+ return fileImage;
case FileListingService.TYPE_LINK:
- return mFileLinkImage;
+ return fileLinkImage;
case FileListingService.TYPE_DIRECTORY:
- return mFolderImage;
+ return folderImage;
case FileListingService.TYPE_DIRECTORY_LINK:
- return mFolderLinkImage;
+ return folderLinkImage;
case FileListingService.TYPE_ROOT_EMULATOR:
- return mEmulatorImage;
+ return emulatorImage;
case FileListingService.TYPE_ROOT_DEVICE:
- return mDeviceImage;
+ return deviceImage;
}
}
- // default case return a different image.
- return mOtherImage;
+
+ return otherImage;
}
return null;
}
switch (columnIndex) {
case 0:
return entry.getName();
- case 1:
- {
- switch(index)
- {
- case 0:
- return entry.getSize();
- case 1:
- return entry.getDate();
- case 2:
- return entry.getTime();
- case 3:
- return entry.getPermissions();
- case 4:
- return entry.getInfo();
- }
- }
}
} else if (element instanceof IDevice) {
IDevice device = (IDevice) element;
@Override
public void addListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
}
@Override
public void dispose() {
- // TODO Auto-generated method stub
-
}
@Override
public boolean isLabelProperty(Object element, String property) {
- // TODO Auto-generated method stub
return false;
}
@Override
public void removeListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
}
}
import com.samsung.tizen.common.connection.ddmuilib.console.DdmConsole;
import com.samsung.tizen.common.connection.debugtools.ToolsInstall;
import com.samsung.tizen.common.connection.sdblib.dnd.FileEntryTransfer;
+import com.samsung.tizen.common.log.Logger;
import com.samsung.tizen.sdblib.FileListingService;
import com.samsung.tizen.sdblib.FileListingService.FileEntry;
import com.samsung.tizen.sdblib.IDevice;
IDebugBridgeChangeListener,
ISelectionListener {
- private final static String TRACE_KEY_EXT = ".key"; // $NON-NLS-1S
- private final static String TRACE_DATA_EXT = ".data"; // $NON-NLS-1S
private final static String DRAGACTIONID = "com.samsung.tizen.common.connection.filedrop";
private String INVALID_FOR_FILENAME = ";";
- private static Pattern mKeyFilePattern = Pattern.compile("(.+)\\"
- + TRACE_KEY_EXT); // $NON-NLS-1S
- private static Pattern mDataFilePattern = Pattern.compile("(.+)\\"
- + TRACE_DATA_EXT); // $NON-NLS-1S
-
public static String COLUMN_NAME = "name"; //$NON-NLS-1S
private Composite mParent;
- private TreeViewer mTreeViewer;
- private Tree mTree;
+ private TreeViewer treeViewer;
+ private Tree tree;
private ConnectionExplorerContentProvider mContentProvider;
private ToolItem pushToolItem;
private IDevice mCurrentDevice;
- private String mDefaultSave;
+ private String defaultSave;
// only use on linux system
private String PATH_SEPARATOR = "/";
- private final ArrayList<IDevice> mDevicesToExpand = new ArrayList<IDevice>();
- private final ArrayList<IDevice> mDevicesList = new ArrayList<IDevice>();
+ private final ArrayList<IDevice> devicesToExpand = new ArrayList<IDevice>();
+ private final ArrayList<IDevice> devicesList = new ArrayList<IDevice>();
private FileEntry currentFileEntry;
public ConnectionExplorerPanel() {
}
- /**
- * Creates a control capable of displaying some information. This is called
- * once, when the application is initializing, from the UI thread.
- */
+
@Override
protected Control createControl(Composite parent) {
mParent = parent;
parent.setLayout(new FillLayout());
- mTree = new Tree(parent, SWT.MULTI | SWT.FULL_SELECTION );
- mTree.setHeaderVisible(true);
+ tree = new Tree(parent, SWT.MULTI | SWT.FULL_SELECTION );
+ tree.setHeaderVisible(true);
IPreferenceStore store = DdmUiPreferences.getStore();
- // create columns
- TableHelper.createTreeColumn(mTree, "FileEntry", SWT.LEFT,
+ TableHelper.createTreeColumn(tree, "FileEntry", SWT.LEFT,
"abcdefghijklmnopqrstuvwz", COLUMN_NAME, store); //$NON-NLS-1$
- mTree.setHeaderVisible(false);
+ tree.setHeaderVisible(true);
- mTreeViewer = new TreeViewer(mTree);
- // setup data provider
+ treeViewer = new TreeViewer(tree);
mContentProvider = new ConnectionExplorerContentProvider();
- mTreeViewer.setContentProvider(mContentProvider);
- mTreeViewer.setLabelProvider(new ConnectionExplorerLabelProvider(
+ treeViewer.setContentProvider(mContentProvider);
+ treeViewer.setLabelProvider(new ConnectionExplorerLabelProvider(
mParent.getDisplay()));
- mTree.addSelectionListener(new SelectionAdapter() {
+ tree.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
notifyListeners();
}
});
- // add support for double click
-// mTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
-// public void doubleClick(DoubleClickEvent event) {
-// ISelection sel = event.getSelection();
-//
-// if (sel instanceof IStructuredSelection) {
-// IStructuredSelection selection = (IStructuredSelection) sel;
-//
-// if (selection.size() == 1) {
-// FileEntry entry = (FileEntry) selection
-// .getFirstElement();
-// String name = entry.getName();
-//
-// FileEntry parentEntry = entry.getParent();
-//
-// // can't really do anything with no parent
-// if (parentEntry == null) {
-// return;
-// }
-//
-// // check this is a file like we want.
-// Matcher m = mKeyFilePattern.matcher(name);
-// if (m.matches()) {
-// // get the name w/o the extension
-// String baseName = m.group(1);
-//
-// // add the data extension
-// String dataName = baseName + TRACE_DATA_EXT;
-//
-// FileEntry dataEntry = parentEntry
-// .findChild(dataName);
-//
-// handleTraceDoubleClick(baseName, entry, dataEntry);
-//
-// } else {
-// m = mDataFilePattern.matcher(name);
-// if (m.matches()) {
-// // get the name w/o the extension
-// String baseName = m.group(1);
-//
-// // add the key extension
-// String keyName = baseName + TRACE_KEY_EXT;
-//
-// FileEntry keyEntry = parentEntry
-// .findChild(keyName);
-//
-// handleTraceDoubleClick(baseName, keyEntry,
-// entry);
-// }
-// }
-// }
-// }
-// }
-// });
// setup drag listener
- mTreeViewer.addDragSupport(
+ treeViewer.addDragSupport(
DND.DROP_MOVE | DND.DROP_COPY,
new Transfer[]{PluginTransfer.getInstance(),
FileEntryTransfer.getInstance()},
@Override
public void dragStart(DragSourceEvent e) {
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
for (int i = 0; i < items.length; i++) {
Object data = items[i].getData();
@Override
public void dragSetData(DragSourceEvent e) {
// get the selection
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
FileEntry[] entries = new FileEntry[items.length];
for (int i = 0; i < items.length; i++) {
}
});
+
// setup drop listener
- mTreeViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE,
+ treeViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE,
new Transfer[]{FileTransfer.getInstance()},
- new ViewerDropAdapter(mTreeViewer) {
+ new ViewerDropAdapter(treeViewer) {
@Override
public boolean performDrop(Object data) {
// get the item on which we dropped the item(s)
}
});
- return mTree;
+ return tree;
}
public void setToolItems(ToolItem push, ToolItem pull, ToolItem start ) {
Action actionPush, Action actionPull, Action actionRefresh,
Action actionRename, Action actionProperty, Action actionDelete) {
this.subMenu = subMenu;
-// this.actionAddFolder = actionAddFolder;
-// this.actionAddFile = actionAddFile;
this.actionPush = actionPush;
this.actionPull = actionPull;
this.actionRefresh = actionRefresh;
*/
@Override
public void setFocus() {
- mTree.setFocus();
+ tree.setFocus();
}
-// /**
-// * Processes a double click on a trace file
-// *
-// * @param baseName
-// * the base name of the 2 files.
-// * @param keyEntry
-// * The FileEntry for the .key file.
-// * @param dataEntry
-// * The FileEntry for the .data file.
-// */
-// private void handleTraceDoubleClick(String baseName, FileEntry keyEntry,
-// FileEntry dataEntry) {
-// // first we need to download the files.
-// File keyFile;
-// File dataFile;
-// String path;
-// try {
-// // create a temp file for keyFile
-// File f = File.createTempFile(baseName, ".trace");
-// f.delete();
-// f.mkdir();
-//
-// path = f.getAbsolutePath();
-//
-// keyFile = new File(path + PATH_SEPARATOR + keyEntry.getName());
-// dataFile = new File(path + PATH_SEPARATOR + dataEntry.getName());
-// } catch (IOException e) {
-// return;
-// }
-//
-// // download the files
-// try {
-// SyncService sync = mCurrentDevice.getSyncService();
-// if (sync != null) {
-// ISyncProgressMonitor monitor = SyncService
-// .getNullProgressMonitor();
-// SyncResult result = sync.pullFile(keyEntry,
-// keyFile.getAbsolutePath(), monitor);
-// if (result.getCode() != SyncService.RESULT_OK) {
-// DdmConsole.printErrorToConsole(String.format(
-// "Failed to pull %1$s: %2$s", keyEntry.getName(),
-// result.getMessage()));
-// return;
-// }
-//
-// result = sync.pullFile(dataEntry, dataFile.getAbsolutePath(),
-// monitor);
-// if (result.getCode() != SyncService.RESULT_OK) {
-// DdmConsole.printErrorToConsole(String.format(
-// "Failed to pull %1$s: %2$s", dataEntry.getName(),
-// result.getMessage()));
-// return;
-// }
-//
-// // now that we have the file, we need to launch traceview
-// String[] command = new String[2];
-// command[0] = DdmUiPreferences.getTraceview();
-// command[1] = path + PATH_SEPARATOR + baseName;
-//
-// try {
-// final Process p = Runtime.getRuntime().exec(command);
-//
-// // create a thread for the output
-// new Thread("Traceview output") {
-// @Override
-// public void run() {
-// // create a buffer to read the stderr output
-// InputStreamReader is = new InputStreamReader(
-// p.getErrorStream());
-// BufferedReader resultReader = new BufferedReader(is);
-//
-// // read the lines as they come. if null is returned,
-// // it's
-// // because the process finished
-// try {
-// while (true) {
-// String line = resultReader.readLine();
-// if (line != null) {
-// DdmConsole
-// .printErrorToConsole("Traceview: "
-// + line);
-// } else {
-// break;
-// }
-// }
-// // get the return code from the process
-// p.waitFor();
-// } catch (IOException e) {
-// } catch (InterruptedException e) {
-//
-// }
-// }
-// }.start();
-//
-// } catch (IOException e) {
-// }
-// }
-// } catch (IOException e) {
-// DdmConsole.printErrorToConsole(String.format(
-// "Failed to pull %1$s: %2$s", keyEntry.getName(),
-// e.getMessage()));
-// return;
-// }
-// }
-
/**
* Pull the current selection on the local drive. This method displays a
* dialog box to let the user select where to store the file(s) and
*/
public void pullSelection() {
// get the selection
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
// name of the single file pull, or null if we're pulling a directory
// or more than one object.
String filePullName = null;
FileEntry singleEntry = null;
- // are we pulling a single file?
+ //Pull the single file
if (items.length == 1) {
singleEntry = (FileEntry) items[0].getData();
if (singleEntry.getType() == FileListingService.TYPE_FILE) {
}
// where do we save by default?
- String defaultPath = mDefaultSave;
+ String defaultPath = defaultSave;
if (defaultPath == null) {
defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
}
String fileName = fileDialog.open();
if (fileName != null) {
- mDefaultSave = fileDialog.getFilterPath();
+ defaultSave = fileDialog.getFilterPath();
pullFile(singleEntry, fileName);
}
*/
public void pushIntoSelection() {
// get the name of the object we're going to pull
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
if (items.length == 0) {
return;
// There should be only one.
FileEntry entry = (FileEntry) items[0].getData();
- // dlg.setFileName(entry.getName());
- String defaultPath = mDefaultSave;
+ String defaultPath = defaultSave;
if (defaultPath == null) {
defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
}
fileName = dlg.open();
if (fileName != null) {
- mDefaultSave = dlg.getFilterPath();
+ defaultSave = dlg.getFilterPath();
// we need to figure out the remote path based on the current
// selection type.
}
pushFile(fileName, remotePath);
- mTreeViewer.refresh(toRefresh);
+ treeViewer.refresh(toRefresh);
}
}
String fullPath = currentFileEntry.getFullPath();
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
if (items.length != 1) {
return;
}
public void flush() {
- mTreeViewer.refresh(parentEntry);
+ treeViewer.refresh(parentEntry);
}
public boolean isCancelled() {
}
});
} catch (IOException e) {
- // adb failed somehow, we do nothing. We should be displaying the
- // error from the output
- // of the shell command.
+ Logger.error("failed to do add new file", e);
+ throw new RuntimeException(e);
}
refresh(parentEntry);
}
return;
String fullPath = currentFileEntry.getFullPath();
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
if (items.length != 1) {
return;
}
public void flush() {
- mTreeViewer.refresh(parentEntry);
+ treeViewer.refresh(parentEntry);
}
public boolean isCancelled() {
}
});
} catch (IOException e) {
- // adb failed somehow, we do nothing. We should be displaying the
- // error from the output
- // of the shell command.
+ Logger.error("failed to do add new folder", e);
+ throw new RuntimeException(e);
}
refresh(parentEntry);
}
String newPath = fullPath.substring(0, lastIndex) + PATH_SEPARATOR
+ renameDialog.getValue();
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
if (items.length != 1) {
return;
}
public void flush() {
- mTreeViewer.refresh(parentEntry);
+ treeViewer.refresh(parentEntry);
}
public boolean isCancelled() {
}
});
} catch (IOException e) {
- // adb failed somehow, we do nothing. We should be displaying the
- // error from the output
- // of the shell command.
+ Logger.error("failed to do rename", e);
+ throw new RuntimeException(e);
}
refresh(parentEntry);
}
if (ret == IDialogConstants.CANCEL_ID)
return;
- TreeItem[] items = mTree.getSelection();
-
- // FileEntry entry = (FileEntry) items[0].getData();
- // final FileEntry parentEntry = entry.getParent();
+ TreeItem[] items = tree.getSelection();
for (TreeItem item : items) {
final FileEntry entry = (FileEntry) item.getData();
}
public void flush() {
- mTreeViewer.refresh(entry.getParent());
+ treeViewer.refresh(entry.getParent());
}
public boolean isCancelled() {
}
});
} catch (IOException e) {
- // adb failed somehow, we do nothing. We should be displaying
- // the
- // error from the output
- // of the shell command.
+ Logger.error("failed to do delete", e);
+ throw new RuntimeException(e);
+
}
refresh(entry.getParent());
}
* Force a full refresh of the explorer.
*/
public void refresh() {
- mTreeViewer.refresh(true);
+ treeViewer.refresh(true);
}
/**
* @see IDebugBridgeChangeListener#serverChanged(SmartDevelopmentBridge)
*/
public void bridgeChanged(final SmartDevelopmentBridge bridge) {
- if (mTree.isDisposed() == false) {
+ if (tree.isDisposed() == false) {
exec(new Runnable() {
public void run() {
- if (mTree.isDisposed() == false) {
+ if (tree.isDisposed() == false) {
// set up the data source.
- mTreeViewer.setInput(bridge);
+ treeViewer.setInput(bridge);
} else {
// tree is disposed, we need to do something.
}
// all current devices are obsolete
- synchronized (mDevicesToExpand) {
- mDevicesToExpand.clear();
+ synchronized (devicesToExpand) {
+ devicesToExpand.clear();
}
}
* the entry to refresh.
*/
private void refresh(final FileEntry entry) {
- Display d = mTreeViewer.getTree().getDisplay();
+ Display d = treeViewer.getTree().getDisplay();
d.asyncExec(new Runnable() {
public void run() {
- mTreeViewer.refresh(entry);
+ treeViewer.refresh(entry);
}
});
}
public void refreshSelection() {
if (currentFileEntry == null)
return;
- Display d = mTreeViewer.getTree().getDisplay();
+ Display d = treeViewer.getTree().getDisplay();
d.asyncExec(new Runnable() {
public void run() {
- mTreeViewer.refresh(currentFileEntry);
+ treeViewer.refresh(currentFileEntry);
}
});
}
final FileEntry[] entryArray = entries
.toArray(new FileEntry[entries.size()]);
- // get a progressdialog
+ // get a progress dialog
new ProgressMonitorDialog(mParent.getShell()).run(true, true,
new IRunnableWithProgress() {
public void run(IProgressMonitor monitor)
* Pushes a file on a device.
*
* @param local
- * the local filepath of the file to push
+ * the local file path of the file to push
* @param remoteDirectory
* the remote destination directory on the device
*/
{
if( device.isOffline())
return;
- mDevicesList.add(device);
+ devicesList.add(device);
ToolsInstall.installPackages(device);
exec(new Runnable() {
public void run() {
- if (mTree.isDisposed() == false) {
+ if (tree.isDisposed() == false) {
// refresh all
- mTreeViewer.refresh();
+ treeViewer.refresh();
// notify the listener of a possible selection change.
notifyListeners();
}
});
- // if it doesn't have clients yet, it'll need to be manually expanded
- // when it gets them.
- // if (device.hasClients() == false) {
- synchronized (mDevicesToExpand) {
- mDevicesToExpand.add(device);
+ synchronized (devicesToExpand) {
+ devicesToExpand.add(device);
}
}
@Override
public void deviceDisconnected(IDevice device) {
- mDevicesList.remove(device);
+ devicesList.remove(device);
exec(new Runnable() {
public void run() {
- if (mTree.isDisposed() == false) {
+ if (tree.isDisposed() == false) {
// refresh all
- mTreeViewer.refresh();
+ treeViewer.refresh();
// notify the listener of a possible selection change.
notifyListeners();
}
});
- // if it doesn't have clients yet, it'll need to be manually expanded
- // when it gets them.
- // if (device.hasClients() == false) {
- synchronized (mDevicesToExpand) {
- mDevicesToExpand.add(device);
+ synchronized (devicesToExpand) {
+ devicesToExpand.add(device);
}
// }
}
@Override
public void deviceChanged(IDevice device, int changeMask) {
if (changeMask == 1) {
- mDevicesList.add(device);
+ devicesList.add(device);
ToolsInstall.installPackages(device);
exec(new Runnable() {
public void run() {
- if (mTree.isDisposed() == false) {
+ if (tree.isDisposed() == false) {
// refresh all
- mTreeViewer.refresh();
+ treeViewer.refresh();
// notify the listener of a possible selection change.
notifyListeners();
}
});
- // if it doesn't have clients yet, it'll need to be manually
- // expanded when it gets them.
- // if (device.hasClients() == false) {
- synchronized (mDevicesToExpand) {
- mDevicesToExpand.add(device);
+ synchronized (devicesToExpand) {
+ devicesToExpand.add(device);
}
}
}
public ArrayList<IDevice> getDeviceList() {
- return mDevicesList;
+ return devicesList;
}
private void exec(Runnable runnable) {
- if( mTree.isDisposed() == false)
+ if( tree.isDisposed() == false)
{
try {
- Display display = mTree.getDisplay();
+ Display display = tree.getDisplay();
display.asyncExec(runnable);
} catch (SWTException e) {
// tree is disposed, we need to do something. lets remove ourselves
private void notifyListeners() {
// get the selection
- TreeItem[] items = mTree.getSelection();
+ TreeItem[] items = tree.getSelection();
FileEntry file = null;
if (devices.length != 0) {
mCurrentDevice = devices[0];
file = devices[0].getFileListingService().getRoot();
- for(TreeItem item : mTree.getItems())
+ for(TreeItem item : tree.getItems())
{
if( item.getText().equals(file.getName()))
- mTree.setSelection(item);
+ tree.setSelection(item);
}
} else
mCurrentDevice = null;
}
public TreeViewer getTreeViewer() {
- return mTreeViewer;
+ return treeViewer;
}
class FileNameValidator implements IInputValidator {
exec(new Runnable() {
public void run() {
- if (mTree.isDisposed() == false) {
- for(TreeItem item : mTree.getItems())
+ if (tree.isDisposed() == false) {
+ for(TreeItem item : tree.getItems())
{
if( item.getText().equals(selectedEntry.getName()))
- mTree.setSelection(item);
+ tree.setSelection(item);
}
} else {
// tree is disposed, we need to do something.
}\r
\r
public static String getString(String key) {\r
- // TODO Auto-generated method stub\r
try {\r
return RESOURCE_BUNDLE.getString(key);\r
} catch (MissingResourceException e) {\r
}\r
\r
public static String getString(String key, Object binding) {\r
- // TODO Auto-generated method stub\r
try {\r
return RESOURCE_BUNDLE.getString(key);\r
} catch (MissingResourceException e) {\r
import com.samsung.tizen.sdblib.SmartDevelopmentBridge;
/**
- * Small dialog box to open new log view with some options.
+ * Small dialog box to open new logtab with some options.
*/
public class AddViewDialog extends Dialog {
if (tabName != null)
tabNameText.setText(tabName);
tabNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// tabNameText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// tabName = tabNameText.getText();
-// validate();
-// }
-// });
l = new Label(top, SWT.NONE);
l.setText("Device : ");
}
}
-// dCombo.addSelectionListener(new SelectionAdapter() {
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// if (dCombo.getItemCount() != 0) {
-// // get the selection
-// device = dCombo.getItem(dCombo.getSelectionIndex());
-// validate();
-// }
-// }
-// });
-
- // separator
-// l = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
-// l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-// Composite mid = new Composite(shell, SWT.NONE);
-// mid.setLayoutData(new GridData(GridData.FILL_BOTH));
-// mid.setLayout(new GridLayout(2, false));
-
-
Group mid = new Group(shell, SWT.SHADOW_IN);
mid.setText("Search Keywords");
mid.setLayoutData(new GridData(GridData.FILL_BOTH));
tagText.setMessage("Separated by a space/comma");
tagText.setToolTipText("Search Tag Keywords are separated by a space as well as a comma");
tagText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// tagText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// if( tagText.getText().length() != 0)
-// tagKeyword = tagText.getText();
-// else
-// tagKeyword = null;
-// validate();
-// }
-// });
l = new Label(mid, SWT.NONE);
l.setText("Pid : ");
pidText.setMessage("Separated by a space/comma");
pidText.setToolTipText("Search Pid Keywords are separated by a space as well as a comma");
pidText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// pidText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// if( pidText.getText().length() != 0)
-// pidKeyword = pidText.getText();
-//// validate();
-// }
-// });
l = new Label(mid, SWT.NONE);
l.setText("Message : ");
msgText.setMessage("Separated by a space/comma");
msgText.setToolTipText("Search Message Keywords are separated by a space as well as a comma");
msgText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// msgText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// if( msgText.getText().length() != 0)
-// msgKeyword = msgText.getText();
-//// validate();
-// }
-// });
-
-// // center part with the filter parameters
-// Composite mid = new Composite(shell, SWT.NONE);
-// mid.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// mid.setLayout(new GridLayout(3, false));
-//
-// final Button btnPid = new Button(mid, SWT.CHECK);
-// btnPid.setText("Pid");
-// if (bPid)
-// btnPid.setSelection(true);
-// btnPid.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// if (btnPid.getSelection())
-// bPid = true;
-// else
-// bPid = false;
-// validate();
-// }
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-// });
-//
-// final Button btnTag = new Button(mid, SWT.CHECK);
-// btnTag.setText("Tag");
-// if (bTag)
-// btnTag.setSelection(true);
-// btnTag.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// if (btnTag.getSelection())
-// bTag = true;
-// else
-// bTag = false;
-// validate();
-// }
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-// });
-//
-// final Button btnMsg = new Button(mid, SWT.CHECK);
-// btnMsg.setText("Message");
-// if (bMsg)
-// btnMsg.setSelection(true);
-// btnMsg.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// if (btnMsg.getSelection())
-// bMsg = true;
-// else
-// bMsg = false;
-// validate();
-// }
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-// });
-//
-// Composite bottom = new Composite(shell, SWT.NONE);
-// bottom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// bottom.setLayout(new GridLayout(2, false));
-//
-// l = new Label(bottom, SWT.NONE);
-// l.setText("Search : ");
-//
-// searchText = new Text(bottom, SWT.SINGLE | SWT.BORDER);
-// searchText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// searchText.setEnabled(false);
-// if (keyword != null)
-// searchText.setText(keyword);
-// searchText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// keyword = searchText.getText();
-// validate();
-// }
-// });
-
- // separator
-// l = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
-// l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
// bottom part with the ok/cancel
Composite bottomComp = new Composite(shell, SWT.NONE);
}
});
-// validate();
}
-// public String getKeyword() {
-// return keyword;
-// }
-
public String getName() {
return tabName;
}
return msgKeyword;
}
-// public boolean getPidChecked() {
-// return bPid;
-// }
-//
-// public boolean getTagChecked() {
-// return bTag;
-// }
-//
-// public boolean getMsgChecked() {
-// return bMsg;
-// }
-
- // /**
- // * Validates the content of the 2 text fields and enable/disable "ok",
- // while
- // * setting up the warning/error message.
- // */
- private void validate() {
- //
- if (tabName == null || tabName.equals("")) {
- okButton.setEnabled(false);
- return;
- }
- // then we check it only contains digits.
- if (device == null) {
- okButton.setEnabled(false);
- return;
- }
-
-// if (bMsg || bPid || bTag) {
-// if (!searchText.getEnabled())
-// searchText.setEnabled(true);
-//
-// if (keyword == null || keyword.equals("")) {
-// okButton.setEnabled(false);
-// return;
-// }
-//
-// } else {
-// if (searchText.getEnabled())
-// searchText.setEnabled(false);
-// }
- okButton.setEnabled(true);
- }
-
public void setName(String name) {
this.tabName = name;
}
-//
-// public void setKeyword(String word) {
-// this.keyword = word;
-// }
}
\ No newline at end of file
public static int ENABLE_DEFAULT = 1;
public static int ENABLE_ALL = 2;
- private String mDefaultLogSave;
+ private String defaultLogSave;
private Composite parent;
private TabFolder folders;
private Text filterText;
private LogColors colors;
- /**
- * Circular buffer containing the logcat output. This is unfiltered. The
- * valid content goes from <code>mBufferStart</code> to
- * <code>mBufferEnd - 1</code>. Therefore its number of item is
- * <code>mBufferEnd - mBufferStart</code>.
- */
public static ArrayList<LogTab> tabs = new ArrayList<LogTab>();
private LogTab currentTab;
public String time;
}
- private ITableFocusListener mGlobalListener;
+ private ITableFocusListener globalListener;
/** message data, separated from content for multi line messages */
protected static class LogMessage {
parent = p;
- // Composite top = new Composite(parent, SWT.NONE);
- // top.setLayoutData(new GridData(GridData.FILL_BOTH));
- // top.setLayout(new GridLayout(1, false));
-
// create the tab folder
folders = new TabFolder(parent, SWT.NONE);
folders.setLayoutData(new GridData(GridData.FILL_BOTH));
table.setHeaderVisible(true);
table.setLinesVisible(true);
- if (mGlobalListener != null) {
+ if (globalListener != null) {
addTableToFocusListener(table);
}
public void setTableFocusListener(ITableFocusListener listener) {
// record the global listener, to make sure table created after
// this call will still be setup.
- mGlobalListener = listener;
+ globalListener = listener;
for (LogTab tab : tabs) {
addTableToFocusListener(tab.getTable());
// listener
table.addFocusListener(new FocusListener() {
public void focusGained(FocusEvent e) {
- mGlobalListener.focusGained(activator);
+ globalListener.focusGained(activator);
}
public void focusLost(FocusEvent e) {
- mGlobalListener.focusLost(activator);
+ globalListener.focusLost(activator);
}
});
}
dlg.setText("Export Log");
dlg.setFileName(getCurrentLogTab().getFilterName() +"-log.txt");
- String defaultPath = mDefaultLogSave;
+ String defaultPath = defaultLogSave;
if (defaultPath == null) {
defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
}
} while (again);
if (fileName != null) {
- mDefaultLogSave = dlg.getFilterPath();
+ defaultLogSave = dlg.getFilterPath();
// loop on the selection and output the file.
try {
return;
AddViewDialog dlg = new AddViewDialog(parent.getShell(),
getCurrentLogTab().getFilterDeviceName());
- // LogView view = null;
+
if (dlg.open()) {
for (IDevice device : SmartDevelopmentBridge.getBridge()
.getDevices()) {
return;
}
- // private void autosave(LogMessage msg)
- // {
- // if( autoFile!=null)
- // try {
- // autoFile.append(msg.toString());
- // autoFile.append('\n');
- // }
- // catch (IOException e)
- // {
- // e.printStackTrace();
- // }
- // }
-
public static TableColumn createTableColumn(Table parent, String header,
int style, String sample_text) {
// create the column
TableColumn col = new TableColumn(parent, style);
- // if there is no pref store or the entry is missing, we use the
- // sample
- // text and pack the column.
- // Otherwise we just read the width from the prefs and apply it.
col.setText(sample_text);
col.pack();
return tabs.get(index);
} else
return null;
- //
- // // if mFilters is null or index is invalid, we return the
- // default
- // // filter. It doesn't matter if that one is null as well, since
- // we
- // // would return null anyway.
- // if (index == 0 || mFilters == null) {
- // return mDefaultFilter;
- // }
-
}
public void stopAll() {
private Table table;
private TabItem tabItem;
- private boolean mIsCurrentTabItem = false;
private int mUnreadCount = 0;
private static Pattern logPattern = Pattern
private ArrayList<LogMessage> tableMessages = new ArrayList<LogMessage>();
private ArrayList<LogMessage> newMessages = new ArrayList<LogMessage>();
- // private final ArrayList<LogMessage> mfMessages = new
- // ArrayList<LogMessage>();
private LogMessage[] buffer = new LogMessage[STRING_BUFFER_LENGTH];
private LogMessageInfo lastMessageInfo = null;
- private boolean mPendingAsyncRefresh = false;
+ private boolean pendingAsyncRefresh = false;
private boolean isDefault = false;
- private int mRemovedMessageCount = 0;
+ private int removedMessageCount = 0;
- /** Represents the oldest message in the buffer */
private int indexStart = -1;
-
- /**
- * Represents the next usable item in the buffer to receive new message.
- * This can be equal to indexStart, but when used indexStart will be
- * incremented as well.
- */
private int indexEnd = -1;
- /**
- * Creates a filter with a particular mode.
- *
- * @param name
- * The name to be displayed in the UI
- */
public LogTab(String name, IDevice device, LogColors colors) {
filterName = name;
filterDevice = device;
return result.toArray(new String[(result.size())]);
}
-
- /**
- * Returns the UI display name.
- */
public String getFilterName() {
return filterName;
}
return levelMode;
}
- // public String getFilterWord()
- // {
- // return filterWord;
- // }
-
public String getPidFilter() {
return pidFilterString;
}
return filterDevice.getSerialNumber();
}
- /**
- * Set the Table ui widget associated with this filter.
- *
- * @param tabItem
- * The item in the TabFolder
- * @param table
- * The Table object
- */
public void setTab(TabItem tabItem) {
this.tabItem = tabItem;
}
this.table = table;
}
- /**
- * Returns true if the filter is ready for ui.
- */
public boolean uiReady() {
return (table != null && tabItem != null);
}
tabItem = null;
}
- // /**
- // * Returns the current filtering mode.
- // *
- // * @return A bitmask. Possible values are MODE_PID, MODE_TAG, MODE_LEVEL
- // */
- // public int getFilteringMode() {
- // return filterMode;
- // }
-
- /**
- * Starts a new LogTab and set mCurrentLogTab as the current receiver.
- *
- * @param device
- * the device to connect LogTab to.
- */
public void startLogTab() {
- // if (device == filterDevice) {
- // return;
- // }
-
- // if we have a LogTab already running
- // if (filterDevice != null) {
- // stopLogTab(false);
- // filterDevice = null;
- // }
resetUI(false);
if (filterDevice != null) {
}
if (logger == null || logger.isCancelled) {
- // LogTab was stopped/cancelled before
- // the device became ready.
return;
}
} catch (Exception e) {
Log.e("LogTab", e);
} finally {
- // at this point the command is
- // terminated.
logger = null;
filterDevice = null;
}
if (logger != null) {
logger.isCancelled = true;
- // when the thread finishes, no one will reference that
- // object
- // and it'll be destroyed
logger = null;
- // // reset the content buffer
- // for (int i = 0; i < STRING_BUFFER_LENGTH; i++) {
- // buffer[i] = null;
- // }
- //
- // // because it's a circular buffer, it's hard to know if
- // // the array is empty with both start/end at 0 or if it's
- // // full
- // // with both start/end at 0 as well. So to mean empty, we
- // // use -1
- // indexStart = -1;
- // indexEnd = -1;
clear();
- // resetFilters();
resetUI(inUiThread);
}
}
- /**
- * Sets the selected state of the filter.
- *
- * @param selected
- * selection state.
- */
- public void setSelectedState(boolean selected) {
- // if (selected) {
- // if (tabItem != null) {
- // tabItem.setText(filterName);
- // }
- // mUnreadCount = 0;
- // }
- mIsCurrentTabItem = selected;
- }
-
- /**
- * Adds a new message and optionally removes an old message.
- * <p/>
- * The new message is filtered through {@link #accept(LogMessage)}. Calls to
- * {@link #flush()} from a UI thread will display it (and other pending
- * messages) to the associated {@link Table}.
- *
- * @param logMessage
- * the MessageData object to filter
- * @return true if the message was accepted.
- */
public boolean addMessage(LogMessage newMessage, LogMessage oldMessage) {
synchronized (tableMessages) {
if (oldMessage != null) {
int index = tableMessages.indexOf(oldMessage);
if (index != -1) {
- // TODO check that index will always be -1 or
- // 0, as only the oldest message is ever
- // removed.
tableMessages.remove(index);
- mRemovedMessageCount++;
+ removedMessageCount++;
}
- // now we look for it in mNewMessages. This can
- // happen if the new message is added
- // and then removed because too many messages are
- // added between calls to #flush()
index = tableMessages.indexOf(oldMessage);
if (index != -1) {
- // TODO check that index will always be -1 or
- // 0, as only the oldest message is ever
- // removed.
tableMessages.remove(index);
}
}
boolean filter = accept(newMessage);
if (filter) {
- // at this point the message is accepted, we add it
- // to the list
tableMessages.add(newMessage);
newMessages.add(newMessage);
}
}
}
- /**
- * Filters a message.
- *
- * @param logMessage
- * the Message
- * @return true if the message is accepted by the filter.
- */
boolean accept(LogMessage logMessage) {
if (logMessage == null)
return false;
}
if (pidFilter != null || tagFilter != null || msgFilter != null) {
- // if ((filterMode & FILTER_PID) == FILTER_PID) {
if (pidFilter != null) {
for( String filter : pidFilter)
{
}
}
- // if ((filterMode & FILTER_TAG) == FILTER_TAG) {
if (tagFilter != null) {
for( String filter : tagFilter ){
if (logMessage.data.tag.toLowerCase().contains(
}
}
- // if ((filterMode & FILTER_MSG) == FILTER_MSG) {
if (msgFilter != null) {
for( String filter : msgFilter){
if (logMessage.msg.toLowerCase().contains(
return false;
}
- /**
- * Takes all the accepted messages and display them. This must be called
- * from a UI thread.
- */
- // @UiThread
public void flush() {
- // if scroll bar is at the bottom, we will scroll
ScrollBar bar = table.getVerticalBar();
boolean scroll = bar.getMaximum() == bar.getSelection()
+ bar.getThumb();
- // if we are not going to scroll, get the current first item being
- // shown.
int topIndex = table.getTopIndex();
- // disable drawing
table.setRedraw(false);
int totalCount = newMessages.size();
try {
// remove the items of the old messages.
- for (int i = 0; i < mRemovedMessageCount
+ for (int i = 0; i < removedMessageCount
&& table.getItemCount() > 0; i++) {
table.remove(0);
}
if (totalCount > 0) {
table.showItem(table.getItem(totalCount - 1));
}
- } else if (mRemovedMessageCount > 0) {
+ } else if (removedMessageCount > 0) {
// we need to make sure the topIndex is still visible.
// Because really old items are removed from the list, this
// could make it disappear
// if we don't change the scroll value at all.
- topIndex -= mRemovedMessageCount;
+ topIndex -= removedMessageCount;
if (topIndex < 0) {
// looks like it disappeared. Lets just show the
// first item
}
newMessages.clear();
- mRemovedMessageCount = 0;
+ removedMessageCount = 0;
}
// refresh, we
// ask the Display
// to run one in the UI thread.
- if (mPendingAsyncRefresh == false) {
- mPendingAsyncRefresh = true;
+ if (pendingAsyncRefresh == false) {
+ pendingAsyncRefresh = true;
try {
Display display = table.getDisplay();
// be -1 or 0, as only the oldest
// message is ever removed.
tableMessages.remove(index);
- mRemovedMessageCount++;
+ removedMessageCount++;
}
}
}
// list
tableMessages.add(newMessage);
newMessages.add(newMessage);
- // autosave( newMessage );
}
}
} finally {
// the pending refresh is done.
- mPendingAsyncRefresh = false;
+ pendingAsyncRefresh = false;
}
}
} else {
}
public void msgClear() {
- mRemovedMessageCount = 0;
+ removedMessageCount = 0;
newMessages.clear();
lastMessageInfo = null;
tableMessages.clear();
msgClear();
}
- // public void setFilterWord(String word) {
- // filterWord = word;
- // }
- //
- // public void setFilterMode(int mode) {
- // filterMode = mode;
- // }
-
public void setDevice(IDevice device) {
filterDevice = device;
}
FileEntry f = (FileEntry)getElement().getAdapter(FileEntry.class);
// Path text field
Label pathValueText = new Label(composite, SWT.NONE);
-// pathValueText.setText(((IResource) getElement()).getFullPath().toString());
pathValueText.setText(f.getFullPath());
}
for (int i = 0; i < entries.length; i++) {
File f = new File(entries[i]);
+ if( resource == null )
+ return false;
IPath localPath = resource.getFullPath().append(f.getName());
IResource newRes = resource.getWorkspace().getRoot().findMember(localPath);
// now create the log view
logPanel = new LogPanel(colors);
- logPanel.setActions( logLevelActions, addAction, removeAction, editAction, exportAction, clearAction);
+ logPanel.setActions( logLevelActions, addAction, removeAction, editAction, exportAction, clearAction);
placeActions();
logPanel.setActionEnabled(LogPanel.ENABLE_NOTHING);
logPanel.createPanel(parent);
- // ConnectionPlugin.getDefault().addSelectionListener(this);
- // place the actions.
-
// setup the copy action
clipboard = new Clipboard(d);
IActionBars actionBars = getViewSite().getActionBars();