import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
}
}
}
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptorFromPlugin(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
}
\ No newline at end of file
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.part.ViewPart;
+import com.samsung.tizen.common.connection.ConnectionPlugin;
import com.samsung.tizen.common.connection.ddmuilib.ImageLoader;
import com.samsung.tizen.common.connection.log.LogColors;
import com.samsung.tizen.common.connection.log.LogPanel;
// private Action mGotoErrorLineAction;
private static Action[] logLevelActions;
- private String[] logLevelIcons = { "/log/v.png", //$NON-NLS-1S
- "/log/d.png", //$NON-NLS-1S
- "/log/i.png", //$NON-NLS-1S
- "/log/e.png", //$NON-NLS-1S
- "/log/w.png", //$NON-NLS-1S
+ private String[] logLevelIcons = { "icons/log/v.png", //$NON-NLS-1S
+ "icons/log/d.png", //$NON-NLS-1S
+ "icons/log/i.png", //$NON-NLS-1S
+ "icons/log/e.png", //$NON-NLS-1S
+ "icons/log/w.png", //$NON-NLS-1S
};
// private Action mClearAction;
}
};
addAction.setToolTipText("Add Tab");
- addAction.setImageDescriptor(loader.loadDescriptor("/log/Add tab.png"));
+ addAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Add tab.png"));
removeAction = new Action("Remove Tab") {
@Override
}
};
removeAction.setToolTipText("Remove Tab");
- removeAction.setImageDescriptor(loader.loadDescriptor("/log/Remove tab.png"));
+ removeAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Remove tab.png"));
editAction = new Action("Edit Tab") {
@Override
}
};
editAction.setToolTipText("Edit Tab");
- editAction.setImageDescriptor(loader.loadDescriptor("/log/Edit tab.png"));
+ editAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Edit tab.png"));
exportAction = new Action("Export Log") {
@Override
}
};
exportAction.setToolTipText("Export Log");
- exportAction.setImageDescriptor(loader.loadDescriptor("/log/Export Log.png")); //$NON-NLS-1$
+ exportAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Export Log.png")); //$NON-NLS-1$
clearAction = new Action("Clear Log") {
@Override
}
};
clearAction.setToolTipText("Clear Log");
- clearAction.setImageDescriptor(loader.loadDescriptor("/log/Clear Log.png")); //$NON-NLS-1$
+ clearAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Clear Log.png")); //$NON-NLS-1$
// mGotoMethodDeclarationAction = new
// CommonAction("Go to Problem (method declaration)") {
};
logLevelActions[i].setToolTipText(name);
- logLevelActions[i].setImageDescriptor(loader
- .loadDescriptor(logLevelIcons[i]));
+ logLevelActions[i].setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin(logLevelIcons[i]));
}
// now create the log view