mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 16:15:25 +02:00
52 lines
1.5 KiB
HTML
Executable file
52 lines
1.5 KiB
HTML
Executable file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
|
|
<head>
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
|
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
|
<title>ShowJarContents Class After Editing</title>
|
|
</head>
|
|
|
|
<body bgcolor="#ffffff">
|
|
<h1>ShowJarContents Class After Editing</h1>
|
|
<p>
|
|
<pre><samp>
|
|
package samples.ui.actions;
|
|
|
|
import com.ibm.etools.systems.core.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction;
|
|
<b>import com.ibm.etools.systems.subsystems.*;</b>
|
|
|
|
/**
|
|
* <i>An action that runs a command to display the contents of a Jar file.</i>
|
|
* <i>The plugin.xml file restricts this action so it only appears for .jar files.</i>
|
|
*/
|
|
public class ShowJarContents
|
|
extends SystemAbstractRemoteFilePopupMenuExtensionAction
|
|
{
|
|
|
|
/**
|
|
* Constructor for ShowJarContents.
|
|
*/
|
|
public ShowJarContents()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* @see com.ibm.etools.systems.core.ui.actions.SystemAbstractPopupMenuExtensionAction#run()
|
|
*/
|
|
public void run()
|
|
{
|
|
<b>IRemoteFile selectedFile = getFirstSelectedRemoteFile();</b>
|
|
<b>String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath();</b>
|
|
<b>runCommand(cmdToRun);</b>
|
|
}
|
|
|
|
}
|
|
|
|
</samp></pre>
|
|
</p>
|
|
</body>
|
|
</html>
|