VirtualBox

Changeset 46478 in vbox for trunk/src/libs/xpcom18a4/java


Ignore:
Timestamp:
Jun 10, 2013 4:31:35 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86321
Message:

libs/xpcom: touch up Java XPCOM wrapper generation, new common exception handlin
g model
Main/glue: Java glue code with better exception handling, indentation/coding style fixes both in the XSLT and the generated code, touched up Java sample code showing exception handling and getting all error information, Python indentation/whitespace cleanup
Main/idl: make more interfaces available over the webservice, some minor docs changes, whitespace cleanup
Main/webservice: redo error reporting through exceptions, no longer loses error
information, allow more fine-grained suppression of methods/attributed, touched up C++ webservice sample code to support showing the full error information, build system changes to prepare for incremental Java compilation, indentation fixesFrontends/VBoxShell: minor cleanups, coding style fixes, indentation fixes, elim
inate warnings

Location:
trunk/src/libs/xpcom18a4/java
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/java/Makefile.kmk

    r41477 r46478  
    174174        $(QUIET)$(RM) -f $(wildcard $(VBOX_JXPCOM_GEN)/java/glue/*.java)
    175175        $(QUIET)$(VBOX_XSLTPROC)   \
     176              --stringparam filelistonly ""                    \
    176177              --stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
    177178              --stringparam G_vboxGlueStyle xpcom              \
  • trunk/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp

    r38636 r46478  
    380380
    381381extern "C" NS_EXPORT jobject JNICALL
     382#ifdef VBOX
     383XPCOM_NATIVE2(getServiceManager) (JNIEnv *env, jobject)
     384#else
    382385XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject)
     386#endif
    383387{
    384388  // Call XPCOM method
  • trunk/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp

    r38904 r46478  
    14961496            {
    14971497                nsCOMPtr <nsIException> ex;
    1498                 rc = em->GetExceptionFromProvider(r, NULL, getter_AddRefs (ex));
     1498                rc = em->GetCurrentException(getter_AddRefs (ex));
    14991499                if  (NS_SUCCEEDED (rc) && ex)
    15001500                {
  • trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java

    r29140 r46478  
    8888   */
    8989  public XPCOMException(long code, String message) {
    90     super(message + "  (0x" + Long.toHexString(code) + ")");
     90    super(message + " (0x" + Long.toHexString(code) + ")");
    9191    this.errorcode = code;
    9292  }
  • trunk/src/libs/xpcom18a4/java/tools/genjifaces.xsl

    r44529 r46478  
    88
    99    genjifaces.xsl:
    10         XSLT stylesheet that generates Java XPCOM bridge intreface code from VirtualBox.xidl.
    11 
    12     Copyright (C) 2010-2012 Oracle Corporation
     10        XSLT stylesheet that generates Java XPCOM bridge interface code from VirtualBox.xidl.
     11
     12    Copyright (C) 2010-2013 Oracle Corporation
    1313
    1414    This file is part of VirtualBox Open Source Edition (OSE), as
     
    6868  <xsl:param name="name" />
    6969  <xsl:text>/**
    70  *  Copyright (C) 2010 Oracle Corporation
     70 *  Copyright (C) 2010-2013 Oracle Corporation
    7171 *
    7272 *  This file is part of VirtualBox Open Source Edition (OSE), as
     
    120120
    121121  public nsISupports queryInterface(String arg1);
    122 
    123 }
    124 
     122}
    125123]]></xsl:text>
    126124
     
    129127 </xsl:call-template>
    130128
    131 <xsl:call-template name="startFile">
     129 <xsl:call-template name="startFile">
    132130    <xsl:with-param name="file" select="'nsIComponentManager.java'" />
    133131 </xsl:call-template>
     
    147145  public nsISupports createInstanceByContractID(String arg1, nsISupports arg2, String arg3);
    148146}
    149 
    150147]]></xsl:text>
    151148
     
    154151 </xsl:call-template>
    155152
    156 <xsl:call-template name="startFile">
     153 <xsl:call-template name="startFile">
    157154    <xsl:with-param name="file" select="'nsIServiceManager.java'" />
    158155 </xsl:call-template>
     
    172169  public boolean isServiceInstantiatedByContractID(String arg1, String arg2);
    173170}
    174 
    175171]]></xsl:text>
    176172
     
    179175 </xsl:call-template>
    180176
    181 <xsl:call-template name="startFile">
     177 <xsl:call-template name="startFile">
     178    <xsl:with-param name="file" select="'nsIExceptionManager.java'" />
     179 </xsl:call-template>
     180
     181 <xsl:text><![CDATA[
     182public interface nsIExceptionManager extends nsISupports
     183{
     184  public static final String NS_IEXCEPTIONMANAGER_IID =
     185    "{efc9d00b-231c-4feb-852c-ac017266a415}";
     186
     187  public nsIException getCurrentException();
     188}
     189]]></xsl:text>
     190
     191 <xsl:call-template name="endFile">
     192   <xsl:with-param name="file" select="'nsISupports.java'" />
     193 </xsl:call-template>
     194
     195 <xsl:call-template name="startFile">
     196    <xsl:with-param name="file" select="'nsIExceptionService.java'" />
     197 </xsl:call-template>
     198
     199 <xsl:text><![CDATA[
     200public interface nsIExceptionService extends nsIExceptionManager
     201{
     202  public static final String NS_IEXCEPTIONSERVICE_IID =
     203    "{35a88f54-f267-4414-92a7-191f6454ab52}";
     204
     205  public nsIExceptionManager getCurrentExceptionManager();
     206}
     207]]></xsl:text>
     208
     209 <xsl:call-template name="endFile">
     210   <xsl:with-param name="file" select="'nsISupports.java'" />
     211 </xsl:call-template>
     212
     213 <xsl:call-template name="startFile">
     214    <xsl:with-param name="file" select="'nsIException.java'" />
     215 </xsl:call-template>
     216
     217 <xsl:text><![CDATA[
     218public interface nsIException extends nsISupports
     219{
     220  public static final String NS_IEXCEPTION_IID =
     221    "{f3a8d3b4-c424-4edc-8bf6-8974c983ba78}";
     222
     223   // No methods - placeholder
     224}
     225]]></xsl:text>
     226
     227 <xsl:call-template name="endFile">
     228   <xsl:with-param name="file" select="'nsISupports.java'" />
     229 </xsl:call-template>
     230
     231 <xsl:call-template name="startFile">
    182232    <xsl:with-param name="file" select="'nsIComponentRegistrar.java'" />
    183233 </xsl:call-template>
     
    191241   // No methods - placeholder
    192242}
    193 
    194243]]></xsl:text>
    195244
     
    199248
    200249
    201 <xsl:call-template name="startFile">
     250 <xsl:call-template name="startFile">
    202251    <xsl:with-param name="file" select="'nsIFile.java'" />
    203252 </xsl:call-template>
     
    211260  // No methods - placeholder
    212261}
    213 
    214262]]></xsl:text>
    215263
     
    218266 </xsl:call-template>
    219267
    220 <xsl:call-template name="startFile">
     268 <xsl:call-template name="startFile">
    221269    <xsl:with-param name="file" select="'nsILocalFile.java'" />
    222270 </xsl:call-template>
     
    230278  // No methods - placeholder
    231279}
    232 
    233280]]></xsl:text>
    234281
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette