How to convert WAR application to be able to deploy it with JSPM and SDM?

We have to be able to deploy an application packaged in WAR file usign the JSPM and SDM GUI tools.
Using the Deploy tool there are no problems to build EAR file from the WAR and deploy it successfully to tha Application Server.
How should we convert our WAR application, or the EAR file created with the DeployTool in order to be able to use these 2 tools?
Using that EAR file with the JSPM and SDM GUI tools doesn't work:
JSPM
The ear file is copied in the inbox directory, but there is the following message:
No applicable support package stack(s) found for deployment in inbox directory
server\sapmnt\trans\EPS\in
SDM GUI:
When providing the EAR file created with the DeployTool, the SDM GUI fails to add it:
com.sap.sdm.util.sduread.IllFormattedSduFileException: The information about the development component found in the manifest is either missing or incomplete!
Manifest attributes are missing or have badly formatted value:
attribute keylocation is missing
attribute keyname is missing
attribute keyvendor is missing
attribute keycounter is missing
After adding these attributes, we couldn't manage to provide valid manifest header.
How can we modify/create valid manifest in order to be able to use the SDM GUI tool?
Please, give us directions how to convert our WAR package in order to use these tools?

Hi Sam
Check out the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/1b/92e4e701b242c2833a7adde6ecad09/frameset.htm
If you have an already built war file then most probably the easiest way to assemble it and deploy it will be to use the deploy tool (http://help.sap.com/saphelp_nw04/helpdata/en/35/e3ee3da7138e5be10000000a114084/frameset.htm) Usually we use the NetWeaver Developer Studio to build and deploy J2EE Applications (http://help.sap.com/saphelp_nw04/helpdata/en/fe/a3996fa314f94f8a0c3475b08636d0/frameset.htm).
OR
As i understand you the source files arent available so rebuilding is out of question.
0. Add web-j2ee-engine.xml in the same path as web.xml
<web-j2ee-engine>
<login-module-configuration/>
</web-j2ee-engine>
1. Create a Dummy EAR file.
2. Add the WAR file to the base directory (path should be blank if you view the EAR in WinZip).
3. Open the application.xml and add the entry for the WAR file
<application id="Application_ID">
<display-name>EAR_Name</display-name>
<module id="WebModule_1127381405488">
<web>
<web-uri><WAR NAME>.war</web-uri>
<context-root>sampleContextRoot</context-root>
</web>
</module>
</application>
Note: The number in module id has some significance, for the time being you have any random number.
Deploy the EAR.
Reward points if usefull

Similar Messages

  • How do convert an Illus CS5 file to Photoshop CS5 File with layers, and separate layer to shop cropping?

    How do I convert an illus CS5 file to a Photoshop CS5 file for printing purposes, maintaining layers and with the ability to have a separate layer to show cropping?

    YOu export it from AI.
    Mylenium

  • I have an old mpg video file, taken with a very early model "smart phone", that opens and plays fine in my newly "rebuilt" iPhoto library. I cannot open, edit it or share it with any other software. How can I fix it, to be able to do anything with it?

    I have an old mpg video file, taken with a very early model "smart phone", that opens and plays fine in my newly "rebuilt" iPhoto library. I cannot open, edit it or share it with any other software. How can I fix it, to be able to do anything with it?
    Detail:
    I've recently purchaced a 4TB Thunderbolt drive to store my "vast" music and photo libraries. iPhoto had an issue reading the moved library, so I bought and used iPhoto Library Manager to "rebuild" it. Apart from much of the original data such as date taken & camera used etc, it appears to be working well. The aforementioned mpg video was taken some 9 years ago, using an early model "iMate" smart phone, and opens and plays fine on iPhoto, but I cannot open it with anything else, (I've tried iMovie, VLC players, Wondershare and Handbrake) nor can I share it. I just want to edit it, and share it with family.
    Any help would be appreciated...

    No - not iMovie, VLC, Wondershare or Handbrake... Quick time starts with a "CONVERTING", then I get
    I've looked at the "tell me more" links, tried downloading some of the movie players there. I'm begining to think the file is corrupt.
    Thanks for getting back to me again though - appreciate it...

  • How to connect my Mac Air 13" to my Philips display with DVI and VGA ports?

    How to connect my Mac Air 13" to my Philips display with DVI and VGA ports?

    Use a DVI to micro-DVI adapter if you're on an original MacBook Air, and a Mini DisplayPort adapter for a newer one.
    (119682)

  • How do I connect my MacBook Pro to an LCD TV (with HDMI and S-Video ports)?

    How do I connect my MacBook Pro to an LCD TV (with HDMI and S-Video ports)?  I assume I would need to use the DVI to Video adapter that came with my computer to connect to my LCD tv.  I'm just not sure which port I should use on the TV.  The HDMI port is being used for digital cable.
    Also, does anyone know if this can be done wirelessly? 

    For a 2010+ MBP you can connect with a Displayport to HDMI, which will include Audio.
    With older MBP you will need a displayport to HDMI, if you want audio to the actually TV, then you will need to get a cable with either digital out from MBP to the HDMI, or USB audio mixed into the HDMI
    eg
    http://eshop.macsales.com/item/NewerTech/CBLMDPHDMID/

  • How much it cost for replacement of ipad mini 2 lcd with retina and touch screen

    how much it cost for replacement of ipad mini 2 lcd with retina and touch screen

    Apple's Limited Warranty http://www.apple.com/legal/warranty/ for iPad excludes coverage for damage resulting from accident, disassembly, unauthorized service and unauthorized modifications.
    The warranty will apply to the country of purchase. And if there is a problem needing repair you have to return it to the country of purchase.
    Out-of-Warranty Service
         If you own an iPad that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will replace (Apple doesn't repair) your iPad with an iPad that is new or equivalent to new in both performance and reliability for the Out-of-Warranty Service fee listed below. (The replacement will most likely be a refurbished iPad in a brown box, however, it has a new screen, back and battery.)   
    iPad model
    Out-of-Warranty Service Fee
    iPad mini
    $219
    iPad 3rd, 4th, Air
    $299
    iPad 2, iPad
    $249
    A $6.95 shipping fee will be added if service is arranged through Apple and requires shipping. All fees are in US dollars and are subject to local tax.
    Certain damage is ineligible for out-of-warranty service, including catastrophic damage, such as the device separating into multiple pieces, and inoperability caused by unauthorized modifications. However, an iPad that has failed due to contact with liquid may be eligible for out-of-warranty service. See http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipad
    iPad Repair and Service
    http://www.apple.com/support/ipad/repair/
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
    You may can get the iPad repaired at 3rd party repair sources for less $, however, any remaining Apple warranty will be voided.
    iCracked - Broken iPhone, iPod or iPad
    http://www.icracked.com/
    iReVamp Electronics Screen Repair ($99)
    http://www.irevampelectronics.com/ipad-2-broken-glass-screen-repair.html
    iPad Repair & Screen Replacement Services
    http://www.ifixyouri.com/16-ipad-repairs
    RepairZoom iPad Repair
    http://www.repairzoom.com/ipad-repair.html
    Mission Repair
    http://www.missionrepair.com/Apple_iPad_Repair_Services_s/431.htm
    iGadgetResQ
    http://www.igadgetresq.com/ipad-repair/
    Do It Yourself iPad Repair
    http://www.ifixit.com/Device/iPad
     Cheers, Tom

  • How to convert an Application Service into a Web Service

    Hi,
    I am working on SAP Netweaver CE 7.1. I have created an Application Service which returns an output as a List with each elemnt of the list conatining some attributes and a List.
    now I want to convert this AS into a Web Service. how I can do that as teh Developer Studio doesn't allow me to select the method which returns the List.
    Also how should I deploy the Web Service and test the same.
    Please reply ASAP.
    Manish

    To convert your Application Service into a Web Service ,
    1) go to General Tab of your Application Service
    2) check the option Remote Enabled Service , Save Metadata
    3) Right click Application Service and select  WebService New , give name for your Webservice and select Default Configuration type : Simple SOAP or select Basic Auth SOAP if u want your webservice to be password protected , just click next and finally finish
    4) Genearte your project code , build and deploy your application
    5) Then goto webService navigator to test your Web service
    Hope this helps
    Thanks
    Asif

  • I just lost my iphone5 in a foreign country. Was not able to register it with icloud and have not installed the findmy iphone app. How can i wipe out my data remotely without these setups? Please help!

    I just lost my iphone5 in a foreign country. Was not able to  previously register it with icloud and have not installed the findmy iphone app. How can i wipe out my data remotely without these setups? Is there any good app i can use to track it? Please help!

    No, nothing you can do to track it if you did not take any measures before the loss.

  • How to convert a number stored as text to as integer with formating

    Hi,
    Can someone say me how to convert a Numeric data that is stored in a Varchar column to an integer.
    Say, I have a Value "-.84566666" in a column which is of data type VARCHAR and I want to show this data as "-0.8456", i.e. I want to display it as an Interger after formating it to have only 4 decimal place value etc.
    Is there any inbuilt function in oracle for this?
    Thanks,

    Take a look at builtin TO_NUMBER / TO_CHAR functions.
    SELECT TO_CHAR(TO_NUMBER('-.84566666'), 'SD9999')
      FROM dual;C.

  • I can't use the (sort by )feature, or open the emages to watch this item - I used to be able to do this with firefox and all of the sudden it stopped working

    I tried to log in :
    http://uae.dubizzle.com/motors/used-cars/land-rover/range-rover-sport/?price__gte=&price__lte=&year__gte=2006&year__lte=2009&kilometers__gte=&kilometers__lte=&seller_type=&keywords=&is_basic_search_widget=0&is_search=1&added__gte=&company_item_id=&auto_agent=
    I can't use the
    - (sort by )feature Lowest to highest for example ,
    - or open the emages to watch this item
    I used to be able to do this with firefox the old version and now all of the sudden it stopped working,
    I tried to clear cash & coockies & un install and reinstall fire fox but nothing works.

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to get UIComponent of the selected node in af:tree with drag and drop

    Hi
    Are there examples showing how one could get a UIComponent using DropEvent to be used with a Popup showing as a custom "context menu" at the target node ?
    Right now, with dropEvent.getDropComponent, we could only get the tree.
    We like to get its selected node so that the popup shows at the node level, not at the tree level.
    Thanks

    Hi Frank
    Thanks for responding.
    We like to show on our custom "context menu" using PopupHints (not using facet name contextmenu) with 3 commandMenuItems.
    Since component id is needed by PopupHints to place this custom "context menu", we tried
    RichTree dropTree = (RichTree)dropEvent.getDropComponent();
    alignId = dropTree.getClientId(context);
    // alignId = pt1:pt_region1:1:pt1:pc1:navTree
    getClientId returns us the tree id and hence the context menu is placed next to tree.
    We like to place the context menu next to a target node of the tree when dragging and dropping.
    But we couldn't figure out how to get that node id.
    In your suggestion,
    List dropRowKey = (List) dropEvent.getDropSite();
    RichTree dropComponent = (RichTree) dropEvent.getDropComponent();
    dropCompoent.setRowKey(dropRowKey);
    how do we then get the id of this node then ? What's the method ?
    Thanks Frank

  • How do I get my USB 2.0 webcam to work with SL and Skype?

    HI
    I have a Mac Mini running Snow Leopard and I have been trying to figure out how to get my USB 2.0 Logitech webcam to work with Skype or iChat. Any hints...? Skype just doesn't see the webcam....

    hassiman wrote:
    HI
    I have a Mac Mini running Snow Leopard and I have been trying to figure out how to get my USB 2.0 Logitech webcam to work with Skype or iChat. Any hints...? Skype just doesn't see the webcam....
    Does your Logitech webcam work with your Mac OS X (10.4.10) Mac?
    This may help for Skype: http://discussions.apple.com/message.jspa?messageID=9975071
    This may help for iChat: http://discussions.apple.com/forum.jspa?forumID=1345
    Mac Pro Quad Core (Early 2009) 2.93Ghz w/Mac OS X (10.6.1)  MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.1)
    G5DP1.8GHz (10.5.8) G4 PowerBook 1.67GHz (10.4.11) iBookSE 366MHz (10.3.9) LED Cinema Display External iSight

  • How to convert WebDynpro Application into Webservoce

    HI Experts,
    I have one WebDynpro Application which has the functionality of search Using KM Index Management API's.
    This performs the search in portal using TREX.
    My requirement is to use this functionality in sharepoint portal(Microsoft Product).
    From this sharepoint portal they want to use this search application to search in portal.
    Now my choice is to convert this WebDynpro application into webservice so that , share point server guys can call webservice to use that search application.
    How can I Convert my webdynpro application into webservice?
    Any other ideas?
    Thanks in advance
    Regards
    Bala
    which needs to be converted into

    Hi Bala,
             I think there is no possibility as for your query. You will be allowed to create a webservice which is a piece of code that can be applicable to required application. Gothrough the following link to know clear details about webservice.  
    http://help.sap.com/saphelp_nw04/helpdata/en/84/54953fc405330ee10000000a114084/content.htm
    download.microsoft.com/download/f/3/7/f371bbba-2341-41bf-822d-2c7dd4174756/UI_CreateWebServices_5min.ppt
    Regards,
    Harish

  • How to convert batch application to server app?

    I have an application that performs some processing task in batch mode: data in, processing, data out. The application can be accessed through a well-documented API but is not thread-safe -- one cannot run the processing function in two threads concurrently.
    In order to make that processing accessible to a program written in another language I would like to encapsulate it into some form of server.
    I would like to find some minimum overhead solution where the other program sends the data to the server app in some way, waits for the processing to complete and reads back the result. One option would be to use the HTTP protocol with a POST request, another to write the data to a database row and send some command over a socket.
    My main problem is: which solution is the easiest to implement and use and the one that allows to serialize the processing with the least effort. The solution should make it easy to prevent deadlocks or similar nuisances.
    Are there some standard patterns for doing this or what would you Wizards recommend?

    Thanks for the answers!
    I must admit that I am still rather clueless in general about the issues involved here.
    My immediate need is to send text files to the java application and get back processed text files. At the moment I have to do this from perl, but in the future, other languages (mostly scripting languages) might also need to do this.
    So what I am trying to achieve is this: the client should be able to access the Java application/service as if it was some synchronous write/read operation (similar to a HTTP post request waiting for a response). There might be several clients working in that way but the the server should make sure that they get cleanly serialised: only one text file can be processed at any one time because the API is not thread safe.
    I also cannot change the API itself -- just wrap into something that will do what I described. The more lightweight,easy to use, and easy to implement the solution the better.
    For example, is there some kind of mini HTTP server and some serialization mechanism in Java that would make it possible to run the Java application disguised as a web service? Are there disadvantages to this and other solutions that are more suited?
    I have looked at JMS and it does make a bit of a heavyweight impression to me. Also I'd prefer a solution where the clients use some mechanism that is more general, e.g. HTTP or the file system or maybe even a RDBS table (not sure what the possible traps with regards to deadlocks, timeouts etc. are there).

  • How to Converting SWT application  to Swing jdialog?

    How hard is to convert an exising dialog writen in Eclipse SWT to Swing
    import java.io.*;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import javax.swing.*;
    import java.awt.*;
    import my.base.Action;
    import my.base.ActionQueue;
    import my.base.Location;
    import my.base.Task;
    import my.base.TaskTree;
    import my.buffer.BlockBuffer;
    import my.fs.File;
    import my.impl.FillBufferActionQueue;
    //import org.apache.log4j.Logger;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.events.MouseAdapter;
    import org.eclipse.swt.events.MouseEvent;
    import org.eclipse.swt.events.SelectionAdapter;
    import org.eclipse.swt.events.SelectionEvent;
    import org.eclipse.swt.events.SelectionListener;
    import org.eclipse.swt.graphics.GC;
    import org.eclipse.swt.graphics.Image;
    import org.eclipse.swt.graphics.ImageData;
    import org.eclipse.swt.graphics.PaletteData;
    import org.eclipse.swt.graphics.RGB;
    import org.eclipse.swt.graphics.Rectangle;
    import org.eclipse.swt.layout.GridData;
    import org.eclipse.swt.layout.GridLayout;
    import org.eclipse.swt.widgets.Button;
    import org.eclipse.swt.widgets.Composite;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.widgets.Menu;
    import org.eclipse.swt.widgets.MenuItem;
    import org.eclipse.swt.widgets.Shell;
    import org.eclipse.swt.widgets.Table;
    import org.eclipse.swt.widgets.TableColumn;
    import org.eclipse.swt.widgets.TableItem;
    public class SynchLogWindow extends org.eclipse.swt.widgets.Composite {
    private Button buttonGo;
    private TableColumn tableColumn1;
    private TableColumn tableColumnDestination;
    private TableColumn tableColumnAction;
    private TableColumn tableColumnSource;
    private TableColumn tableColumnExplanation;
    private Table tableLogLines;
    private Hashtable actionImages;
    private Image locationSource;
    private Image locationDestination;
    private Image locationBoth;
    private Image nodeFile;
    private Image nodeDirectory;
    private TaskTree taskTree;
    public SynchLogWindow(Composite parent, int style)
    super(parent, style);
    initGUI();
    initializeImages();
    * Initializes the GUI.
    * Auto-generated code - any changes you make will disappear.
    public void initGUI(){
    try {
    preInitGUI();
    tableLogLines = new Table(this,SWT.FULL_SELECTION);
    tableColumn1 = new TableColumn(tableLogLines,SWT.NULL);
    tableColumnExplanation = new TableColumn(tableLogLines,SWT.NULL);
    tableColumnSource = new TableColumn(tableLogLines,SWT.NULL);
    tableColumnAction = new TableColumn(tableLogLines,SWT.NULL);
    tableColumnDestination = new TableColumn(tableLogLines,SWT.NULL);
    buttonGo = new Button(this,SWT.PUSH| SWT.CENTER);
    this.setSize(new org.eclipse.swt.graphics.Point(711,225));
    GridData tableLogLinesLData = new GridData();
    tableLogLinesLData.verticalAlignment = GridData.FILL;
    tableLogLinesLData.horizontalAlignment = GridData.FILL;
    tableLogLinesLData.widthHint = -1;
    tableLogLinesLData.heightHint = -1;
    tableLogLinesLData.horizontalIndent = 0;
    tableLogLinesLData.horizontalSpan = 1;
    tableLogLinesLData.verticalSpan = 1;
    tableLogLinesLData.grabExcessHorizontalSpace = true;
    tableLogLinesLData.grabExcessVerticalSpace = true;
    tableLogLines.setLayoutData(tableLogLinesLData);
    tableLogLines.setHeaderVisible(true);
    tableLogLines.setLinesVisible(true);
    tableLogLines.setSize(new org.eclipse.swt.graphics.Point(690,179));
    tableLogLines.addMouseListener( new MouseAdapter() {
    public void mouseUp(MouseEvent evt) {
    tableLogLinesMouseUp(evt);
    tableColumn1.setResizable(false);
    tableColumn1.setText("tableColumn1");
    tableColumnExplanation.setText("Explanation");
    tableColumnExplanation.setWidth(150);
    tableColumnSource.setText("Source");
    tableColumnSource.setWidth(220);
    tableColumnAction.setResizable(false);
    tableColumnAction.setText("Action");
    tableColumnAction.setWidth(50);
    tableColumnDestination.setText("Destination");
    tableColumnDestination.setWidth(220);
    GridData buttonGoLData = new GridData();
    buttonGoLData.verticalAlignment = GridData.CENTER;
    buttonGoLData.horizontalAlignment = GridData.END;
    buttonGoLData.widthHint = -1;
    buttonGoLData.heightHint = -1;
    buttonGoLData.horizontalIndent = 0;
    buttonGoLData.horizontalSpan = 1;
    buttonGoLData.verticalSpan = 1;
    buttonGoLData.grabExcessHorizontalSpace = false;
    buttonGoLData.grabExcessVerticalSpace = false;
    buttonGo.setLayoutData(buttonGoLData);
    buttonGo.setText("Go");
    buttonGo.addSelectionListener( new SelectionAdapter() {
    public void widgetSelected(SelectionEvent evt) {
    buttonGoWidgetSelected(evt);
    GridLayout thisLayout = new GridLayout(1, true);
    this.setLayout(thisLayout);
    thisLayout.marginWidth = 2;
    thisLayout.marginHeight = 2;
    thisLayout.numColumns = 1;
    thisLayout.makeColumnsEqualWidth = false;
    thisLayout.horizontalSpacing = 2;
    thisLayout.verticalSpacing = 2;
    this.layout();
    postInitGUI();
    } catch (Exception e) {
    e.printStackTrace();
    /** Add your pre-init code in here      */
    public void preInitGUI(){
    /** Add your post-init code in here      */
    public void postInitGUI(){
    public static void show( final TaskTree task )
    final Display display = Display.getDefault();
    display.syncExec( new Runnable() {
    public void run()
    try {
    Shell shell = new Shell(display);
    SynchLogWindow inst = new SynchLogWindow(shell, SWT.NULL);
    inst.setTaskTree( task );
    inst.rebuildActionList();
    shell.setLayout(new org.eclipse.swt.layout.FillLayout());
    Rectangle shellBounds = shell.computeTrim(0,0,663,225);
    shell.setSize(shellBounds.width, shellBounds.height);
    shell.setText( "Synchronization Actions" );
    shell.setImage( new Image( null, "images/Location_Both.gif" ) );
    shell.open();
    } catch( Exception ex ) {
    ex.printStackTrace();
    public void setTaskTree( TaskTree task )
    this.taskTree = task;
    public static Image loadImage( String filename )
    try {
    //System.out.println("crrent path:"+System.getProperty("user.dir"));
    return new Image( null, new FileInputStream( "images/"+filename) );
    } catch( FileNotFoundException e ) {
    e.printStackTrace();
    return null;
    public void initializeImages()
    nodeFile = loadImage( "Node_File.gif" );
    nodeDirectory = loadImage( "Node_Directory.gif" );
    locationSource = loadImage( "Location_Source.gif" );
    locationDestination = loadImage( "Location_Destination.gif" );
    locationBoth = loadImage( "Location_Both.gif" );
    actionImages = new Hashtable();
    for( int i = 0; i < Action.names.length; i++ )
    actionImages.put( new Integer( i ), loadImage( "Action_"+Action.names[i]+".gif" ) );
    for( int i = 0; i < Action.errorNames.length; i++ )
    actionImages.put( new Integer( i+10 ), loadImage( "Action_"+Action.errorNames[i]+".gif" ) );
    protected void drawSide( GC g, Task t, Action a, int location )
    File n = location==Location.Source?t.getSource():t.getDestination();
    int x = location==Location.Source?2:2*16+2;
    if( n.exists() )
    if( n.isDirectory() )
    g.drawImage( nodeDirectory, x, 0 );
    else g.drawImage( nodeFile, x, 0 );
    // TODO draw some not-existing image ?
    if( (a.getLocation() & location) > 0 )
    Image actionImage = (Image)actionImages.get( new Integer( a.getType() ) );
    if( actionImage != null )
    g.drawImage( actionImage, x, 0 );
    if( location == Location.Source )
    g.drawImage( locationSource, x+16, 0 );
    else g.drawImage( locationDestination, x-16, 0 );
    protected void drawLocation( GC g, Action a )
    switch( a.getLocation() )
    case Location.Source:
    g.drawImage( locationSource, 16+2, 0 );
    break;
    case Location.Destination:
    g.drawImage( locationDestination, 16+2, 0 );
    break;
    case Location.Both:
    g.drawImage( locationBoth, 16+2, 0 );
    break;
    protected Image buildTaskImage( Task t, Action a )
    ImageData data = new ImageData( 16*3+2, 16, 8, new PaletteData( 0, 0, 0 ) );
    data.transparentPixel = data.palette.getPixel( new RGB( 0, 0, 0 ) );
    Image image = new Image( null, data );
    GC g = new GC(image);
    drawSide( g, t, a, Location.Source );
    drawSide( g, t, a, Location.Destination );
    drawLocation( g, a );
    g.dispose();
    return image;
    protected Image buildTaskImage( Task t )
    return buildTaskImage( t, t.getCurrentAction() );
    protected void addTaskChildren( Task t )
    for( Enumeration e = t.getChildren(); e.hasMoreElements(); )
    addTask( (Task)e.nextElement() );
    protected void addTask( Task t )
    if( !t.getCurrentAction().isBeforeRecursion() )
    addTaskChildren( t );
    Image image = buildTaskImage( t );
    TableItem item = new TableItem( tableLogLines, SWT.NULL );
    item.setImage( 3, image );
    item.setText( new String[] {
    t.getCurrentAction().getExplanation(),
    t.getSource().getPath(),
    t.getDestination().getPath()
    item.setData( t );
    if( t.getCurrentAction().isBeforeRecursion() )
    addTaskChildren( t );
    public void rebuildActionList()
    tableLogLines.clearAll();
    tableLogLines.setItemCount(0);
    addTaskChildren( taskTree.getRoot() );
    //tableLogLines.redraw();
    protected void showPopup( int x, int y )
    System.out.println( "Contextmenu at: "+x+", "+y );
    SelectionListener selListener = new SelectionAdapter() {
    public void widgetSelected( SelectionEvent e )
    Integer i = (Integer)e.widget.getData();
    TableItem item = tableLogLines.getSelection()[0];
    ((Task)item.getData()).setCurrentAction( i.intValue() );
    item.setImage( 3, image );
    item.setText( 1, action.getExplanation() );
    item.setData( action );
    tableLogLines.redraw();
    int top = tableLogLines.getTopIndex();
    rebuildActionList();
    tableLogLines.setTopIndex( top );
    TableItem[] items = tableLogLines.getSelection();
    if( items.length == 0 )
    return;
    Task t = (Task)items[0].getData();
    Menu m = new Menu( this );
    MenuItem mi;
    int curr = t.getCurrentActionIndex();
    Action[] actions = t.getActions();
    for( int i = 0; i < actions.length; i++ )
    if( i == curr )
    continue;
    Action al = actions;
    Image image = buildTaskImage( t, al );
    mi = new MenuItem( m, SWT.NULL );
    mi.setImage( image );
    mi.setText( Action.toString( al.getType() )+" - "+al.getExplanation() );
    mi.setData( new Integer( i ) );
    mi.addSelectionListener( selListener );
    Action al = new Action( Action.Nothing, Location.None, "Ignore" );
    Image image = buildTaskImage( t, al );
    mi = new MenuItem( m, SWT.NULL );
    mi.setImage( image );
    mi.setText( "Ignore" );
    mi.setData( al );
    mi.addSelectionListener( selListener );
    m.setLocation( toDisplay( x, y ) );
    m.setVisible( true );
    protected void performActions()
    try {
    //Logger logger = Logger.getRootLogger();
    //logger.addAppender( new FileAppender( new PatternLayout( "%d{ISO8601} [%p] %c %x - %m%n" ), "log/log.txt" ) );
    // Logger logger = Logger.getLogger( "FullSync" );
    // logger.info( "Synchronizing "+taskTree.getSource().getUri().toString()+" and "+taskTree.getDestination().getUri().toString() );
    // BlockBuffer buffer = new BlockBuffer( logger );
    // buffer.load();
    // ActionQueue queue = new FillBufferActionQueue(buffer);
    TableItem[] items = tableLogLines.getItems();
    for( int i = 0; i < items.length; i++ )
    Task t = (Task)items[i].getData();
    // queue.enqueue( t.getCurrentAction(), t.getSource(), t.getDestination() );
    // queue.flush();
    // buffer.unload();
    taskTree.getSource().flush();
    taskTree.getDestination().flush();
    taskTree.getSource().close();
    taskTree.getDestination().close();
    // logger.info( "finished synchronization" );
    } catch( IOException e ) {
    e.printStackTrace();
    /** Auto-generated event handler method */
    protected void tableLogLinesMouseUp(MouseEvent evt)
    if( evt.button == 3 )
    showPopup( evt.x, evt.y );
    /** Auto-generated event handler method */
    protected void buttonGoWidgetSelected(SelectionEvent evt)
    performActions();
    getShell().dispose();

    Give it a try and let us know.

Maybe you are looking for