Kaydet (Commit) 2ee44f43 authored tarafından Bertram Nolte's avatar Bertram Nolte

Added example Inspector.

üst ed917521
# Builds the java demo component.
PRJ=..$(PS)..$(PS)..
SETTINGS=../../../settings
# Include settings makefile depending on platform/compiler
ifeq "$(MAKECMDGOALS)" "win_microcxx"
-include $(SETTINGS)/win_microcxx_settings.mk
ifndef PS
$(error Platform/Compiler settings file not found)
endif
SHAREDLIB_OUT=$(OUT_BIN)
endif
ifeq "$(MAKECMDGOALS)" "solaris_workshopcxx"
-include $(SETTINGS)/solaris_workshopcxx_settings.mk
ifndef PS
$(error Platform/Compiler settings file not found)
endif
SHAREDLIB_OUT=$(OUT_LIB)
endif
ifeq "$(MAKECMDGOALS)" "linux_gcc"
-include $(SETTINGS)/linux_gcc_settings.mk
ifndef PS
$(error Platform/Compiler settings file not found)
endif
SHAREDLIB_OUT=$(OUT_LIB)
endif
# Define non-platform/compiler specific settings
include $(SETTINGS)/dk.mk
include $(SETTINGS)/std.mk
# Define non-platform/compiler specific settings
# Targets
.PHONY: ALL
ALL :
@echo -------------------------------------------------------------
@echo You must supply a target where TARGET is one of the following:
@echo
@echo win_microcxx : Windows using Microsoft C++ compiler/linker
@echo solaris_workshopcxx : Solaris using Sun Workshop C++ compiler
@echo linux_gcc : Linux using gcc
@echo -------------------------------------------------------------
REGISTERFLAGFILE = $(OUT_MISC)$(PS)register_components_instanceinspector_is_ok.flag
OUT_COMPONENT = $(OUT_CLASS)$(PS)instanceinspector
COMPONENT_RDB = $(OUT_BIN)$(PS)InstanceInspector.rdb
COMPONENT_JAR = $(OUT_CLASS)$(PS)InstanceInspector.jar
COMPONENT_MANIFESTFILE = Manifest
IDLFILES = XInstanceInspector.idl
# normally the idl file should be stored in a directory tree fitting the module structure,
# for the example we know the module structure
PACKAGE = org$(PS)OpenOffice
JAVAFILES = InstanceInspector.java \
Test.java
GENJAVAFILES = $(patsubst %.idl,$(OUT_MISC)$(PS)$(PACKAGE)$(PS)%.java,$(IDLFILES) )
GENURDFILES = $(patsubst %.idl,$(OUT_MISC)$(PS)%.urd,$(IDLFILES) )
CLASSFILES = $(patsubst %.java,$(OUT_COMPONENT)$(PS)%.class,$(JAVAFILES) )
CLASSFILES += $(patsubst %.java,$(OUT_COMPONENT)$(PS)$(PACKAGE)$(PS)%.class,$(GENJAVAFILES) )
DK_CLASSPATH = $(subst $(EMPTYSTRING) $(EMPTYSTRING),, \
$(CLASSES_DIR)$(PS)jurt.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)unoil.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)ridl.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)sandbox.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)java_uno.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)juh.jar\
$(PATH_SEPARATOR)$(CLASSES_DIR)$(PS)jut.jar\
$(PATH_SEPARATOR)$(OUT_COMPONENT) \
)
OFFICE_FILEURL = $(subst \,/,$(OFFICE_PROGRAM_PATH))
OFFICE_CLASSPATH = $(subst $(CLASSES_DIR),$(OFFICE_PROGRAM_PATH)$(PS)classes, $(DK_CLASSPATH))
win_microcxx : $(COMPONENT_JAR) $(REGISTERFLAGFILE)
solaris_workshopcxx : $(COMPONENT_JAR) $(REGISTERFLAGFILE)
linux_gcc : $(COMPONENT_JAR) $(REGISTERFLAGFILE)
include $(SETTINGS)/stdtarget.mk
$(OUT_COMPONENT) : $(OUT) $(OUT_CLASS)
$(MKDIR) $(OUT_COMPONENT)
$(GENJAVAFILES) : $(IDLFILES)
$(BIN_DIR)$(PS)idlc -I. -I$(IDL_DIR) -O$(OUT_MISC) $(IDLFILES)
$(BIN_DIR)$(PS)regmerge $(COMPONENT_RDB) /UCR $(GENURDFILES)
$(BIN_DIR)$(PS)regmerge $(COMPONENT_RDB) / $(BIN_DIR)$(PS)$(DKREGISTRYNAME)
$(BIN_DIR)$(PS)javamaker -BUCR -Torg.OpenOffice.XInstanceInspector -O$(OUT_MISC) $(COMPONENT_RDB)
$(CLASSFILES) : $(OUT_COMPONENT) $(GENJAVAFILES) $(JAVAFILES)
javac -classpath $(DK_CLASSPATH) -d $(OUT_COMPONENT) $(GENJAVAFILES) $(JAVAFILES)
$(COMPONENT_JAR) : $(CLASSFILES)
jar cvfm $(COMPONENT_JAR) Manifest -C $(OUT_COMPONENT) .
@echo ----
@echo Please use the following command to execute
@echo java -classpath $(DK_CLASSPATH) Test
@echo ----
$(REGISTERFLAGFILE) : $(REGISTERFLAGFILE)
ifneq "$(OFFICE_PROGRAM_PATH)" ""
$(BIN_DIR)$(PS)regmerge $(OFFICE_PROGRAM_PATH)$(PS)applicat.rdb /UCR $(GENURDFILES)
$(COPY) $(COMPONENT_JAR) $(OFFICE_PROGRAM_PATH)$(PS)classes
java -classpath $(OFFICE_CLASSPATH) com.sun.star.tools.uno.RegComp "$(URLPREFIX)$(OFFICE_FILEURL)/applicat.rdb" register "$(URLPREFIX)$(OFFICE_FILEURL)/classes/CalcAddins.jar" com.sun.star.loader.Java2
@echo bla > $(REGISTERFLAGFILE)
else
@echo --------------------------------------------------------------------------------
@echo If you want to install your component automatically, please set an
@echo OFFICE_PROGRAM_PATH environment variable to a valid office installation.
@echo --------------------------------------------------------------------------------
endif
/*************************************************************************
*
* $RCSfile: XInstanceInspector.idl,v $
*
* $Revision: 1.1 $
*
* last change: $Author: bnolte $ $Date: 2001-08-16 12:37:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef __org_OpenOffice_XInstanceInspector_idl__
#define __org_OpenOffice_XInstanceInspector_idl__
#include <com/sun/star/uno/XInterface.idl>
//=============================================================================
module org { module OpenOffice {
//=============================================================================
interface XInstanceInspector: com::sun::star::uno::XInterface
{
/*
* For a given instance this method displays all services, interfaces,
* methods, attributes, and contents in a tree. All dependend
* instances are also inspected and displayed, so the user could browse
* the tree. If you press the key "F1", the API-documentation from
* www.openoffice.org for the current instance will be displayed in a
* new window.
*/
void inspect( [in] any aInstance );
};
//=============================================================================
}; };
/*=============================================================================
$Log: not supported by cvs2svn $
=============================================================================*/
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment