JDeveloper extension : JDevLibsForAnt

hi
I would like to be able to use Ant to compile and package my code, but I don't want to maintain libraries in two places, JDeveloper and Ant.
My first approach was to call JDeveloper from Ant using a custom JDeveloper extension that provides an MBean to "access" the JDeveloper extension API.
http://verveja.footsteps.be/~verveja/files/oracle/CallJDevApps-v0.01.zip
Although it "works", it is intended to be used from within JDeveloper.
My second approach was to have a custom JDeveloper extension automatically maintain an Ant build file on each library change in JDeveloper. This Ant build file can than be imported into another Ant build file.
http://verveja.footsteps.be/~verveja/files/oracle/JDevLibsForAntApps-v0.01.zip
Although this does what I want, I have a few questions:
(1) What is the preferred way to get the "outputDirectory" of a Project (see LibrariesProjectChangeListener$MyJProjectPaths)?
(2) How can I get notified of changes to my custom project options (see JDevLibsForAntOptionsPanel and LibrariesProjectChangeListener.isChangeLibraryRelated())?
All suggestions for improvement are welcome.
many thanks
Jan Vervecken

I was interested to read your dialogue because I too am trying to use Ant to automate the build and deployment of JDeveloper projects. I have to say that I'm a total newcomer to JDeveloper, Ant and Java, so much of what you're saying is way above my head!
I've achieved some degree of success with BPEL modules, mainly by using a <for> task to iterate over the build.xml files created by JDeveloper. However I'm coming unstuck with the non-BPEL bits; I know what keystrokes are required to tell JDeveloper how to do the job manually, but I have very little clue about what goes on under the bonnet when I initiate a deployment, so replicating it in my Ant project is well-nigh impossible; furthermore the build.xml files produced by JDeveloper for the non-BPEL stuff all seem to stop short of actually doing the deployment - either to a server or to jar/war/ear files.
I then came across the JDeveloper Ant task <jdev> at http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/anttasks/index.html
which sounded as though it might help. However I encountered some difficulty in getting it to do anything useful other than simply firing up JDeveloper, so I am currently having a dialogue with its author, Gerard Davison at Oracle, to try and get some help. He also suggested a tool called ojmake, which is available in the jdev/bin directory of the Technology Preview for 11, which I've also tried playing with, but I can't get it to work in JDev 10.
Does anybody out there have any knowledge either of the <jdev> Ant task or ojmake, or of any other tools that might help in this situation?

Similar Messages

  • Extending the UML class diagrams with JDeveloper Extensions SDK?

    Hello,
    I studied the JDeveloper Extension SDK docs, but couldn't figure out how to write extensions that support UML Diagrams.
    What I would like to do, is to pin a different data model under the class diagram view.
    Well if you can't do that. In the worst case, my extension would register with a regular class diagram and listen to its events and and refuse particular changes. It would also create or use an empty class diagram and fill in the classes and associations in it. (this is less clean but I could live with it).
    Thanks in advance for all your suggestions.
    Slawek

    By definition you can change classes through the model so I guess the problem here is that the model cannot apply updates to something that it is pointing to the the compiled version of.

  • JDeveloper Extension for SINGLE CLICK deployment of OIM customizations

    I am not sure most of OIM Developers, System Integrators and Architects aware of this Oracle Asset, hence sharing information.
    In most of the questions posted on forum related to event handler usages Plugin Registration utility and weblogic scripts to import / export meta data files into MDS. There is easy way to deploy OIM 11g even handler plugins , Scheduled Tasks, Request Datasets and Notification Events using OIM Customization Installer JDeveloper Extension.
    Oracle has published Oracle Identity Manager 11g Sample Assets some time back. You can use OIM Customization Installer JDeveloper Extension for SINGLE CLICK deployment of OIM customizations like Event Handlers, Plugins, Scheduled Tasks, Request Datasets and Notification Events.
    You can access and download Oracle Asset using below link,
    http://www.oracle.com/technetwork/middleware/id-mgmt/overview/oim-11g-assets-504842.html
    Thanks,
    Pradeep.

    Pradeep,
    Thanks for sharing this. I have gone through this asset sometime back. This is quite helpful w.r.t deployment but does not have any other added advantage. For example, it does not create the xml's automatically or does not validate them etc. If I remember it right, this plugin was supported till 11.1.1.3 only.
    Appreciate you sharing this as it would surely help folks here.
    -Bikash

  • How to create JDeveloper Extension for new Projects ??

    I want to create a JDeveloper Extension for creating new project with following: (11gR2)
    1. Maven Support
    2. pre-defined dependencies in pom.xml
    3. pre-defined project feature (e.g. ADF Business Components)
    4. pre-defined Custom Base classes for ADF Business Componets
    Are there any documents / samples that i can reference ?!

    Some of these can be added declaratively using the template_hook in the extension.xml file and defining an application and project template. Others will need to be added directly.
    1. Add Maven Support
    This can be added declaratively, as technology in the project template hook.
    2. pre-defined dependencies in pom.xml
    This is going to need to be added to your project after it's created.
    3. pre-defined project feature (e.g. ADF Business Components)
    Same as Maven support.
    4. pre-defined Custom Base classes for ADF Business Componets
    You should be able to use the library hook for this, but I'm not quite clear on what this means.
    Here is an example template-hook that describes the creation of a Maven Application and the Maven Project that will be included with it. The <template-hook> element is placed inside the <triggers> section of the extension.xml file in 11gR2 (this won't work in 11gR1). This template-hook is what makes the Maven Application item show up in the New Gallery. Take a look at how that New Maven Application process works, and then look over this example. The <technologyKey> setting what adds the features to your application/project. In the example below, the Maven feature is being added to the project. The technologyKey for ADF Business Components is "ADFbc"
    The commented out lines below are either just comments, or they are optional elements for the project and application template hooks. It's pretty obvious which is which.
         <template-hook>
            <!--Maven Project template-->
            <projectTemplate>
              <templateId>mavenProjectTemplate</templateId>
              <name>Maven Project Template</name>
              <description>${MAVEN_PROJECT_TEMPLATE_DESCRIPTION}</description>
              <!-- <toolTip /> -->
              <!-- <weight /> -->
              <!-- <icon /> -->
              <!-- <galleryFolder /> -->
              <!-- <unsorted /> -->
              <projectName>mavenProj</projectName>
              <!-- <deploymentProfile>a.b.c.D</deploymentProfile> -->
              <technologyScope>
                <technologyKey>Maven</technologyKey>
              </technologyScope>
            </projectTemplate>
            <!-- Maven Application template -->
            <applicationTemplate>
              <templateId>#mavenApplicationTemplate</templateId>
              <!-- <templateClass /> -->
              <name>Maven Application</name>
              <description>${MAVEN_APPLICATION_TEMPLATE_DESCRIPTION}</description>
              <!-- <toolTip /> -->
              <weight>1.0</weight>
              <icon>/oracle/javatools/icons/application.png</icon>
              <!-- <galleryFolder /> -->
              <unsorted>false</unsorted>
              <applicationName>MavenApp</applicationName>
              <!-- <deploymentProfile>a.b.c.D</deploymentProfile> -->
              <projectTemplates>
                <projectTemplate>
                  <templateId>mavenProjectTemplate</templateId>
                  <!-- <name /> -->
                  <!-- <description /> -->
                  <!-- <projectName /> -->
                  <!-- <promptForProjectName /> -->
                  <!-- <deploymentProfile /> -->
                  <technologyScope>
                    <technologyKey>Maven</technologyKey>
                  </technologyScope>
                </projectTemplate>
              </projectTemplates>
            </applicationTemplate>
          </template-hook>For including predefined pom.xml settings, you can either edit the generated pom.xml file after the project is created, or you can add a predefined pom.xml file to the project. You can see more about working with files in a project on the [url https://blogs.oracle.com/jdevextensions/tags/files] JDev Extensions Blog
    Not quite sure what you are looking to do with the last item. If it's libraries that you're looking to add, you can take a look into the <libraries> hook.
    Staying with the Maven example... Here is a partial <libraries> element
          <libraries xmlns="http://xmlns.oracle.com/jdeveloper/1013/jdev-libraries">
            <library name="Apache Maven 3.0.3">
              <classpath>../../apache-maven-3.0.3/lib/maven-aether-provider-3.0.3.jar</classpath>
               <classpath>../../apache-maven-3.0.3/lib/maven-artifact-3.0.3.jar</classpath>
           <classpath>../../apache-maven-3.0.3/lib/maven-compat-3.0.3.jar</classpath>
           <classpath>../../apache-maven-3.0.3/lib/maven-core-3.0.3.jar</classpath>
           <classpath>../../apache-maven-3.0.3/lib/maven-embedder-3.0.3.jar</classpath>
           <classpath>../../apache-maven-3.0.3/lib/maven-model-3.0.3.jar</classpath>
            </library>
          </libraries>Hope all of this helps, Please feel free to contact me directly via email if that would help you out. john<dot>brock<AT>oracle.com
    --jb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help in DB2 JDBC connection from JDeveloper extension

    Hi,
    I am using JDeveloper extension to build my application. Here in the preferences, I have a UI in which I need to specify DB2 database connection parameters for establishing JDBC connection. After copying the required driver jar and license jar to the extension folder and specifying the CLASSPATH in extension.xml file, I am able to get the DB Connection. But the issue here is, I do not want the user to copy the driver jars to the extension path and neither to hardcode the driver CLASSPATH in extension.xml. Instead, if the user loads the driver jar in the CLASSPATH using command line, after launching JDev plug-in, I need to still be able to connect to the DB2 JDBC which is not happening. I am getting the error which says "Missing class com.ibm.db2.jcc.DB2Driver". I have ensured that the CLASSPTH is set for the driver and licensing jars for DB2. How can I get rid of this error without specifying the classpath in extension.xml file.
    Thanks,
    Sudha.
    Edited by: sudha.singh on Dec 13, 2010 1:08 AM
    Edited by: sudha.singh on Dec 13, 2010 1:08 AM

    drivers for DB2 for the JDBC adapter.
    1. db2jcc.jar
    2. db2_license_cu.jar
    3. db2_license_cisuz.jar
    Driver = com.ibm.db2.jcc.DB2Driver
    URL = jdbc:db2://<hostname>:5021/<dbname>:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvjcdif.htm
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc/doc/t0010264.htm

  • JDeveloper Extensions

    Hi folks,
    I'm (mostly for my own use/interest) developing a few JDeveloper extensions.
    During development & testing of my extensions, I find that the IDE wraps & hides any exceptions that I don't handle. This is great behaviour for an end user who is using the extension, but makes life difficult during development. Is there any way for me to disable this behaviour so that any unhandled exceptions get delivered to me somehow (or should I be looking somewhere for this information)?
    Thanks,
    Chris
    PS - If the answer changes based on version, I'm currently using the 10.1.3 preview release.

    Hi Chris,
    There's no way to turn them on, I'm afraid. I'm on a personal crusade against the part of the JDeveloper implementation that causes this ;)
    The reason you don't see stack traces is that we use an assertion mechanism (existed prior to Java 1.4) for printing stack traces. In our nondebug builds (e.g. production code released to customers), all usages of these assertion APIs are stripped out by our compiler.
    Because of that, there's no way for you to see the stack traces unless you can get hold of a debug version of jdev.jar. Since we don't ship that, it's not possible.
    One small possibility is to use the debugger and set exception breakpoints. However, this isn't very useful, since you need to know in advance what kind of exceptions are being thrown.
    There are a couple of things I'm hoping to do in future to improve this:
    - Migrate to java.util.logging and 1.4 asserts instead of our own custom Assert implementation.
    - Possibly look into making the debug ide.jar / javatools.jar / jdev.jar available to extension developers. This would probably not be part of the base product, but in the separate esdk download. This would also make it far easier to debug your extension code (no more _slots in the data window).
    Thanks,
    Brian

  • JDeveloper Extensions and JSR-198

    I have been looking at the feature set provided by the JDeveloper Extension SDK and have read a little bit about what JSR-198 is meant to achieve. Is the current Extension SDK a JSR-198 reference implementation and how many of the supporters of the standard have started moving in the direction of implementing this APIs? Would if be safe to say that the current JDeveloper ESDK represents the era of write once run anywhere in IDE integration?
    Regards
    Chucks

    Hi,
    It will be available before the end of the year. More information here:
    10.1.3 Production, are we there yet ?
    Thanks,
    Brian

  • How can I get JDeveloper Extension sdk for 9.0.4 version

    HI~
    I want to download JDeveloper Extension sdk for 9.0.4 version.
    Of course, I found some link for downloading, but all of them I found were not connected or connected with 11g version.
    I also try to install the sdk in JDeveloper menu called "Check for updates" in help menu. But it was not operated in my pc(Windows 7 64bit).
    I really need to older version Extension sdk.
    How can I get the sdk?

    The only way I see is through support. Versions this old are not accessible via the web.
    Timo

  • Need Oracle JDeveloper extension for ADF Mobile

    Hi Expertises,
    I am doing internal task for demo purpose, so needed Oracle JDeveloper extension for ADF Mobile.
    Could you provide me,
    if i get this by tomorrow that would be a great help from you.
    Thanks
    Jyothi.Y

    Hi,
    the ADF Mobile framework extension is not available for public consumption at this point in time.
    Frank

  • Problem in enabling/disabling Custom JDeveloper Extension

    Hi,
    I've been trying to develop an extension for JDeveloper version 11.1.1.3/11.1.1.4 which i should be able to enable/disable from Tools->Preferences->Extensions section. However the problem i'm facing is that, after installing the newly developed extension, if i try to disable it by unchecking it from the Tools>Preferences->Extensions list, it does not show up in the extensions list after JDeveloper restarts. Therefore if i want to enable it again, i'm not able to do that because it is not available in the list.
    Trouble is that even if i reinstall it again (from Help->Check for updates) it does not appear in the list, and it does not work either because JDeveloper is treating the extension as disabled.
    I've kept my extension.xml simple for now:
    <?xml version="1.0" encoding="windows-1252" ?>
    <extension xmlns="http://jcp.org/jsr/198/extension-manifest" id="oracle.ide.sampleextension" version="11.1.1" esdk-version="1.0">
    <name>Sample Extension</name>
    <owner>Oracle</owner>
    <hooks>
    *<feature-hook>*
    *<description>Sample Extension</description>*
    *<optional>true</optional>*
    *</feature-hook>*
    </hooks>
    </extension>
    My bundle.xml is:
    <update-bundle version="1.0" xmlns="http://xmlns.oracle.com/jdeveloper/updatebundle" xmlns:u="http://xmlns.oracle.com/jdeveloper/update">
    <u:update id="oracle.ide.sampleextension">
    <u:name>Sample Extension</u:name>
    <u:version>11.1.1</u:version>
    <u:author>Oracle</u:author>
    <u:author-url>www.oracle.com</u:author-url>
    <u:description>Sample Extension</u:description>
    <u:requirements>
    <u:requires-extension id="oracle.jdeveloper"
    minVersion="11.1.1.3.37.56.60"
    maxVersion="11.1.1.4.99.99.99" />
    </u:requirements>
    </u:update>
    </update-bundle>
    I've done a lot of troubleshooting on this issue but in vain. I could not find any help on google either. Can anyone please help me on this?
    Thanks in advance,
    Suhail.
    Edited by: 865337 on Jun 13, 2011 2:34 PM

    Hi Suhail,
    Can you zip up your project folder and send it to me in email? I'll look it over and try to find the issue.
    email is: john<DOT>brock<AT>oracle<DOT>com
    I'm not quite sure what is is going on, but I suspect that the extension.xml file is to simple. Not even sure what I mean by that just yet. I want to take a look at see what is in the extension.xml file compared to some of the more basic extensions that I have created for demos and blogs, etc.
    Go ahead and send me the source and I'll take a look.
    Is there a reason that you are staying on 11.1.1.3 by the way? We are up to 11.1.1.5 right now in the 11gR1 release. I'm not aware of a bug like this, but it could be something in the older version.
    --jb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JDeveloper extensions for 11.1.2.4.0 ?

    Greetings,
    i am using Jdeveloper v11.1.2.4.0 for a while now and i noticed Jdeveloper's extensions still are not updated for this latest updated version.
    I am trying to install SOA & BPM extensions. Is there any beta version atleast or any news for when they are coming out? been almost 2 (if not more) months now
    from this version release.. Btw Jdeveloper shows me the soa extension in jdeveloper's update center, but the version is not supported for this jdeveloper version. Please fix this
    update/upgrade center.

    Hi.
    JDeveloper 11gR2 (11.1.2.x) is an ADF-only release. We do not provide the full middleware stack for that version, which explains why the extensions are not available and will never be.To use WebCenter, SOA Suite and other Fusion Middleware technologies, your only option is JDeveloper 11gR1 (11.1.1.x) for the time being.
    By the way, JDeveloper 12c 12.1.2 is in the same case as 11gR2. Support for the full stack will come in a future release of the 12.1.x series. And before you ask: No, I cannot provide details about the time frame for that release (unfortunately).
    Best Regards,
    Frédéric Desbiens
    ADF Product manager
    http://blogs.oracle.com/blueberry
    Twitter:@BlueberryCoder

  • JDeveloper Extension Development - How to

    Based on the Clean White Space extension (by Daniel Work
    CleanWhiteSpace.zip), I modified it to work with JDeveloper 5.0.5.2 (build 1618) and added new functionality to remove every other blank line.
    (FYI: I work on Windows and my CVS server on Linux; when I export/import from CVS, the source code ends up with double line feeds. JDev bug?). In any case, I wrote this utility that cleans this up quickly.
    My question is how to I activate the blicking caret (cursor) in the code editor window after the extension has finished processing the text? (i.e. How could I simulate a mouse click in the editor window where the cursor used to be?)
    Thanks. [email protected]
    Partial code below:
    public class CleanWhiteLinesAddin implements Addin, Controller
    private boolean doCleanWhiteLines(Context context)
    boolean bUpdated = false;
    EditDescriptor editUndoInfo = new EditDescriptor(TITLE);
    BasicEditorPane editor = getCurrentEditorPane(context);
    String initialText = null;
    if (editor != null)
    editor.beginEdit(editUndoInfo);
    try
    int origLinePos = editor.getLineFromOffset(editor.getCaretPosition());
    int newLinePos = origLinePos;
    editor.selectAll();
    String allText = editor.getSelectedText().trim();
    StringBuffer out = new StringBuffer( allText.length() );
    // testing
    //allText = allText.replaceAll("\n", "[[nl]]");
    //allText = allText.replaceAll("\r", "[[cr]]");
    // Write info in the log window
    //LogManager.getLogManager().showLog();
    //LogManager.getLogManager().getMsgPage().log("Source code is:\n" + allText + "\n");
    //LogManager.getLogManager().getMsgPage().log("Line offset=" + origLinePos + "\n");
    allText = allText.replaceAll("\r", "\n"); //if any...
    String aLine = null;
    int lineCount = 0;
    int blankLineCount = 0;
    int beginIndex = 0;
    int endIndex = allText.indexOf('\n', beginIndex); //allText.charAt('\n');
    while ( (beginIndex>=0) && (beginIndex<allText.length())
    && (endIndex>=0) && (endIndex<=allText.length()) )
    aLine = allText.substring(beginIndex, endIndex).trim();
    if ( (0 == aLine.length()) )//&& (!justPrintedBlankLine)
    if (blankLineCount < 1)
    ++blankLineCount;
    if ( (lineCount<newLinePos) && (newLinePos>0) )
    --newLinePos;
    else
    out.append("\n");
    blankLineCount = 0;
    else
    out.append(aLine);
    out.append("\n");
    blankLineCount = 0;
    // forward
    beginIndex = endIndex + 1;
    endIndex = allText.indexOf('\n', beginIndex);
    ++lineCount;
    // At loop exist, make sure that we have the last line in the case where
    // there is not line feed
    if (beginIndex < allText.length())
    out.append( allText.substring(beginIndex) );
    if (!out.equals(allText))
    editor.replaceSelection( out.toString() );
    bUpdated = true;
    editor.moveCaretPosition( editor.getLineEndOffset(newLinePos) - 1);
    editor.unselect();
    // How to we activate the cursor to the line where we where
    // in the column where we were?
    catch (Exception ex)
    ex.printStackTrace();
    finally
    editor.endEdit();
    return bUpdated;

    Hi,
    I'm not sure what's causing your double-line issue with CVS. I routinely use CVS on Linux with a Windows client, and haven't experienced this issue. Do you get the same problem when using cvs from the command line?
    The following addin cleans white lines and preserves the caret position. I converted the code to directly modify the document and use a Position to track the original caret location. This means that even if the line your cursor was on has changed because of removed lines, the cursor position will be restored to the right place:
    package mypackage1;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    import javax.swing.text.Position;
    import oracle.ide.ContextMenu;
    import oracle.ide.Ide;
    import oracle.ide.IdeAction;
    import oracle.ide.addin.Addin;
    import oracle.ide.addin.Context;
    import oracle.ide.addin.ContextMenuListener;
    import oracle.ide.addin.Controller;
    import oracle.ide.editor.EditorManager;
    import oracle.javatools.editor.BasicDocument;
    import oracle.javatools.editor.BasicEditorPane;
    import oracle.javatools.editor.EditDescriptor;
    import oracle.jdeveloper.ceditor.CodeEditor;
    public class CleanWhiteLinesAddin implements Addin, Controller
      private static final String CLEAN_CMD = "oracle.sample.bduff.CleanCommand";
      private BasicEditorPane getCurrentEditorPane( Context context )
        if ( context.getView() instanceof CodeEditor )
          return ((CodeEditor)context.getView()).getFocusedEditorPane();
        return null;
      private int replaceAll( Document doc, char search, char replace )
        throws BadLocationException
        int count = 0;
        for ( int i=0; i < doc.getLength(); i++ )
          if ( doc.getText( i, 1 ).charAt( 0 ) == search )
            doc.remove( i, 1 );
            doc.insertString( i, String.valueOf( replace ), null );
            count++;
        return count;
      private int indexOf( Document doc, char search, int start )
        throws BadLocationException
        for ( int i=start; i < doc.getLength(); i++ )
          if ( doc.getText( i, 1 ).charAt( 0 ) == search )
            return i;
        return -1;
      private boolean doCleanWhiteLines(Context context)
        boolean bUpdated = false;
        EditDescriptor editUndoInfo = new EditDescriptor( "Clean White Lines" );
        BasicEditorPane editor = getCurrentEditorPane(context);
        if (editor != null)
          editor.beginEdit(editUndoInfo);
          Document doc = editor.getDocument();
          try
            // Create a position for the current caret that we can restore later.
            Position p = doc.createPosition( editor.getCaretPosition() );
            bUpdated = replaceAll( doc, '\r', '\n' ) > 0;
            int pos = 0;
            int length = doc.getLength();
            int consecutiveNewLines = 0;
            while ( pos < length )
              char c = ((BasicDocument)doc).getTextBuffer().getChar( pos );
              if ( c == '\n' )
                ++consecutiveNewLines;
              else
                consecutiveNewLines = 0;
              if ( consecutiveNewLines > 1 )
                // Swallow the newline at the current position.
                doc.remove( pos, 1 );
                length--;
                bUpdated = true;
              pos++;
            // Now restore the caret to the original position.
            editor.setCaretPosition( p.getOffset() );
          catch ( BadLocationException ble )
            ble.printStackTrace();
          finally
            editor.endEdit();
        return bUpdated;
      public void initialize()
        final IdeAction doItAction = IdeAction.get(
          Ide.createCmdID( CLEAN_CMD ),
          "Clean White Lines",
          new Integer( 'C' )
        doItAction.addController( this );
        EditorManager.getEditorManager().getContextMenu().addContextMenuListener(
          new ContextMenuListener()
            public boolean handleDefaultAction( Context context )
              return false;
            public void poppingDown( ContextMenu m ) {}
            public void poppingUp( ContextMenu m )
              m.add( m.createMenuItem( doItAction ) );
      public void shutdown()
      public float version()
        return 0;
      public float ideVersion()
        return 0;
      public boolean canShutdown()
        return true;
      public boolean handleEvent(IdeAction action, Context context)
        int myCmdId = Ide.findCmdID( CLEAN_CMD ).intValue();
        if ( action.getCommandId() == myCmdId )
          doCleanWhiteLines( context );
          return true;
        return false;
      public boolean update(IdeAction p0, Context p1)
        return false;
    }

  • JDeveloper Extension

    I'm trying to create an extension in JDeveloper that creates a certain file structure. While the examples provided by Oracle provide a way to create a project, they do not show a way to create folders automatically within this project (which I need to do). I have looked around and it seems like, other than Oracle itself, there is very little documentation on extensions in general, let alone this problem. Does anyone have any insight on how to create these folders/know of a good site that might have some examples?

    It's not something that is real obvious, and I have it on my todo list to get a blog post up about how to do this properly.
    Timo is correct in that you can just use Java IO to add the files and folders to the project directory structure. It's the navigator refresh (to show the new files and structure automatically) that causes problems right now. You can do a manual refresh of the navigator by clicking on the refresh icon at the top of the navigator window.
    Take a look at the last post at the bottom of this thread.
    Re: JDev extension SDK: How to refresh navigator via API?
    If you use the URLFileSytem methods, the new files and folders should show up in the navigator automatically instead of trying to do the refresh.
    Take a look at the CreateDialog sample project (CreatePropertiesFilePanel.java specifically) to see one example of how to create a file and have it added to a project.
    --jb                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JDeveloper extension with XSL mapper

    We want to develop a JDeveloper custom extension (a wizard). In one of the wizard pages, we want to use the JDeveloper's XSL mapper for one of the function.
    Can you please advise whether it is possible. If yes, any details would be highly appreciated.
    Thanks.

    chk this
    http://docs.oracle.com/cd/E11036_01/doc.1013/e10295/xslt_mpr.htm
    you should have SOA composite application extension for this..
    if you dont want a visual transformation then you can use the jdeveloper project properties -> Run/Debug -> edit run configuration -> XSLT

  • JDeveloper extension - custom composite templates

    Is it possible to extend JDeveloper with SOA Suite extension (11.1.1.6) to create custom composite templates ?
    When you create a SOA Project in JDeveloper, Step 2 of 2 (Configure SOA Settings) presents you with a list of seeded composite templates to choose from i.e Empty Composite, Composite with BPEL Process, Composite with Mediator.
    Can I add my own templates that will contain pre-configured BPEL process settings, variables, XSDs etc? The idea is to standardize the development process by reducing the number of steps that a developer will have to do.
    I have not seen any documentation that addresses this.
    Thanks!
    Sunder

    I would love to have this feature. Something like the AIA service constructor but you can provide it with a template project and it creates the composite for you.

Maybe you are looking for

  • Application Context - Add policy

    How can I apply an application context policy to all tables in a database?

  • Support of vr pay virtuell by business catalyst?

    Hello everybody, we would like to use http://www.vr-epay.info/?sub=API-VRPAYPAGE within business catalyst. However, there is no ready-to-use template  in it. Has anyone tried to work with this payment system before? Many thanks in advance for your su

  • Anyone else experiencing problems with 10.8.5?

    I have an iMac mid 2007 running Mountain Lion 10.8.4, and I never had any problems with it up until I updated to 10.8.5 and experienced frequent crashes and spinning wheels of death. After 15 days I have had enough... Is it advisable to return back t

  • Info Record update

    Dear Expert I have created one po and save it when i check the info recod of that PO system is displaying net price 0 is not updated according to po price ,  while i create another PO with same material vendor and plant combination the price is updat

  • ST04 functionality

    Dear all, I want to know how much space my Z* Y* and some of the standard SAP DB tables needs. In ST04 I found a functionality under Space ->Table spaces where I can put only one DB-Table. Is there any other possiblity to analyze more then one table?