diff options
author | David Ostrovsky <david@ostrovsky.org> | 2014-10-09 10:47:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-10 09:41:29 +0200 |
commit | a1552a0ec3fcddd968db274ef41bc2452c50bed9 (patch) | |
tree | e5f97283967605204d666c196b4bc5f522d6e08c /scripting/java/org | |
parent | 87bf3fb4a5def8b0536d44ab406dbd31b09c0daf (diff) |
Scripting: Remove org package
Change-Id: If0b6ac87b5d53da43557dee5824e9413a260ba7c
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scripting/java/org')
112 files changed, 0 insertions, 10476 deletions
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java deleted file mode 100644 index 85995cdfac42..000000000000 --- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Enumeration; -import java.util.StringTokenizer; - -import com.sun.star.script.framework.container.ScriptEntry; -import com.sun.star.script.framework.container.ParcelDescriptor; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.idesupport.filter.AllFilesFilter; -import com.sun.star.script.framework.container.XMLParserFactory; -import org.openoffice.idesupport.*; - -public class CommandLineTools { - private static final String PARCEL_XML_FILE = - ParcelZipper.PARCEL_DESCRIPTOR_XML; - - private static String officePath = null; - - public static void main(String[] args) { - CommandLineTools driver = new CommandLineTools(); - Command command = driver.parseArgs(args); - - // Get the URL for the Office DTD directory and pass it to the - // XMLParserFactory so that Office xml files can be parsed - if (officePath == null) { - try { - SVersionRCFile sv = SVersionRCFile.createInstance(); - - if (sv.getDefaultVersion() != null) { - officePath = sv.getDefaultVersion().getPath(); - } - } catch (IOException ioe) { - System.err.println("Error getting Office directory"); - } - } - - if (officePath == null) { - driver.fatalUsage("Error: Office Installation path not set"); - } - - File officeDir = new File(officePath); - - if (!officeDir.exists() || !officeDir.isDirectory()) { - driver.fatalUsage( - "Error: Office Installation path not valid: " + officePath); - } - - OfficeInstallation oi = new OfficeInstallation(officePath); - String url = oi.getURL("share/dtd/officedocument/1_0/"); - XMLParserFactory.setOfficeDTDURL(url); - - if (command == null) - driver.printUsage(); - else { - try { - command.execute(); - } catch (Exception e) { - driver.fatal("Error: " + e.getMessage()); - } - } - } - - private interface Command { - void execute() throws Exception; - } - - private void printUsage() { - System.out.println("java " + getClass().getName() + " -h " + - "prints this message"); - System.out.println("java " + getClass().getName() + - " [-o Path to Office Installation] " + - "-d <script parcel zip file> " + - "<destination document or directory>"); - System.out.println("java " + getClass().getName() + - " [-o Path to Office Installation] " + - "-g [parcel root directory] [options] [script names]"); - System.out.println("options:"); - System.out.println("\t[-l language[=supported extension 1[" + - File.pathSeparator + "supported extension 2]]]"); - System.out.println("\t[-p name=value]"); - System.out.println("\t[-v]"); - } - - private void fatal(String message) { - System.err.println(message); - System.exit(-1); - } - - private void fatalUsage(String message) { - System.err.println(message); - System.err.println(); - printUsage(); - System.exit(-1); - } - private Command parseArgs(String[] args) { - - if (args.length < 1) { - return null; - } else if (args[0].equals("-h")) { - return new Command() { - public void execute() { - printUsage(); - } - }; - } - - int i = 0; - - if (args[0].equals("-o")) { - officePath = args[i + 1]; - i += 2; - } - - if (args[i].equals("-d")) { - if ((args.length - i) != 3) - return null; - else - return new DeployCommand(args[i + 1], args[i + 2]); - } else if (args[i].equals("-g")) { - - if ((args.length - i) == 1) - return new GenerateCommand(System.getProperty("user.dir")); - - GenerateCommand command; - i++; - - if (!args[i].startsWith("-")) - command = new GenerateCommand(args[i++]); - else - command = new GenerateCommand(System.getProperty("user.dir")); - - for (; i < args.length; i++) { - if (args[i].equals("-l")) { - command.setLanguage(args[++i]); - } else if (args[i].equals("-p")) { - command.addProperty(args[++i]); - } else if (args[i].equals("-v")) { - command.setVerbose(); - } else { - command.addScript(args[i]); - } - } - - return command; - } - - return null; - } - - private static class GenerateCommand implements Command { - - private File basedir, contents, parcelxml; - private boolean verbose = false; - private String language = null; - private MethodFinder finder = null; - private ArrayList<ScriptEntry> scripts = null; - private HashMap properties = new HashMap(3); - - public GenerateCommand(String basedir) { - this.basedir = new File(basedir); - this.contents = new File(basedir, ParcelZipper.CONTENTS_DIRNAME); - this.parcelxml = new File(contents, PARCEL_XML_FILE); - } - - public void setLanguage(String language) { - StringTokenizer tokenizer = new StringTokenizer(language, "="); - this.language = tokenizer.nextToken(); - - if (this.language.equalsIgnoreCase("java")) { - this.finder = JavaFinder.getInstance(); - return; - } - - if (tokenizer.hasMoreTokens()) { - String ext = (String)tokenizer.nextToken(); - String[] extensions; - - if (ext.indexOf(File.pathSeparator) != -1) { - tokenizer = new StringTokenizer(ext, File.pathSeparator); - extensions = new String[tokenizer.countTokens()]; - int i = 0; - - while (tokenizer.hasMoreTokens()) - extensions[i++] = (String)tokenizer.nextToken(); - } else { - extensions = new String[1]; - extensions[0] = ext; - } - - this.finder = new ExtensionFinder(this.language, extensions); - } - } - - public void addProperty(String prop) { - StringTokenizer tok = new StringTokenizer(prop, "="); - - if (tok.countTokens() != 2) - return; - - String name = tok.nextToken(); - String value = tok.nextToken(); - - properties.put(name, value); - } - - public void setVerbose() { - verbose = true; - } - - public void addScript(String script) { - if (language == null) - return; - - addScript(new ScriptEntry(language, script, script, basedir.getName())); - } - - public void addScript(ScriptEntry entry) { - if (scripts == null) - scripts = new ArrayList(3); - - scripts.add(entry); - } - - public void execute() throws Exception { - - if (!basedir.isDirectory()) { - throw new Exception(basedir.getName() + " is not a directory"); - } else if (!contents.exists()) { - throw new Exception(basedir.getName() + - " does not contain a Contents directory"); - } - - if (language == null && !parcelxml.exists()) { - throw new Exception(parcelxml.getName() + " not found and language " + - "not specified"); - } - - if (language != null && parcelxml.exists()) { - ParcelDescriptor desc; - String desclang = ""; - - desc = new ParcelDescriptor(parcelxml); - desclang = desc.getLanguage().toLowerCase(); - - if (!desclang.equals(language.toLowerCase())) - throw new Exception(parcelxml.getName() + " already exists, " + - "and has a different language attribute: " + - desc.getLanguage()); - } - - if (language != null && scripts == null) { - if (finder == null) - throw new Exception("Extension list not specified for this language"); - - log("Searching for " + language + " scripts"); - - ScriptEntry[] entries = finder.findMethods(contents); - - for (int i = 0; i < entries.length; i++) { - addScript(entries[i]); - log("Found: " + entries[i].getLogicalName()); - } - } - - if (scripts != null) { - if (scripts.isEmpty()) - throw new Exception("No valid scripts found"); - - ParcelDescriptor desc = new ParcelDescriptor(parcelxml, language); - desc.setScriptEntries(scripts.toArray(new ScriptEntry[scripts.size()])); - if (properties.size() != 0) { - Enumeration enumer = properties.keys(); - - while (enumer.hasMoreElements()) { - String name = (String)enumer.nextElement(); - String value = (String)properties.get(name); - log("Setting property: " + name + " to " + value); - - desc.setLanguageProperty(name, value); - } - } - - desc.write(); - } else { - if (!parcelxml.exists()) - throw new Exception("No valid scripts found"); - } - - contents = new File(contents.getAbsolutePath()); - String name = ParcelZipper.getParcelZipper().zipParcel(contents, - AllFilesFilter.getInstance()); - System.out.println(name + " generated"); - } - - private void log(String message) { - if (verbose) - System.out.println(message); - } - } - - private static class DeployCommand implements Command { - - File source, target; - - public DeployCommand(String source, String target) { - this.source = new File(source); - this.target = new File(target); - } - - public void execute() throws Exception { - ParcelZipper.getParcelZipper().deployParcel(source, target); - System.out.println(source.getName() + - " successfully deployed to " + target.getAbsolutePath()); - } - } -} diff --git a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java b/scripting/java/org/openoffice/idesupport/ExtensionFinder.java deleted file mode 100644 index 48b80fd77eec..000000000000 --- a/scripting/java/org/openoffice/idesupport/ExtensionFinder.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.io.File; -import java.util.ArrayList; -import org.openoffice.idesupport.zip.ParcelZipper; - -import com.sun.star.script.framework.container.ScriptEntry; - -public class ExtensionFinder implements MethodFinder { - - private String[] extensions; - private String language; - - public ExtensionFinder(String language, String[] extensions) { - this.language = language; - this.extensions = extensions; - } - - public ScriptEntry[] findMethods(File basedir) { - String parcelName; - ArrayList<ScriptEntry> files = new ArrayList<ScriptEntry>(10); - ScriptEntry[] empty = new ScriptEntry[0]; - - if (basedir == null || !basedir.exists() || - !basedir.isDirectory()) - return empty; - - parcelName = basedir.getName(); - - if (parcelName.equals(ParcelZipper.CONTENTS_DIRNAME)) - parcelName = basedir.getParentFile().getName(); - - findFiles(files, basedir, parcelName); - - if (files.size() != 0) - return files.toArray(empty); - - return empty; - } - - private void findFiles(ArrayList<ScriptEntry> list, File basedir, - String parcelName) { - File[] children = basedir.listFiles(); - File f; - - for (int i = 0; i < children.length; i++) { - f = children[i]; - - if (f.isDirectory()) - findFiles(list, f, parcelName); - else { - for (int j = 0; j < extensions.length; j++) { - if (f.getName().endsWith(extensions[j])) { - ScriptEntry entry = new ScriptEntry(language, - f.getName(), parcelName); - list.add(entry); - break; - } - } - } - } - } -} diff --git a/scripting/java/org/openoffice/idesupport/JavaFinder.java b/scripting/java/org/openoffice/idesupport/JavaFinder.java deleted file mode 100644 index b1139ab7dbc7..000000000000 --- a/scripting/java/org/openoffice/idesupport/JavaFinder.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.openoffice.idesupport.zip.ParcelZipper; - -import com.sun.star.script.framework.container.ScriptEntry; - -public class JavaFinder implements MethodFinder { - - private static JavaFinder finder; - private static final String JAVA_SUFFIX = ".java"; - private static final String CLASS_SUFFIX = ".class"; - private static final String FIRST_PARAM = - "drafts.com.sun.star.script.framework.runtime.XScriptContext"; - - private List<String> classpath = null; - - private JavaFinder() {} - - private JavaFinder(List<String> classpath) { - this.classpath = classpath; - } - - - - public static JavaFinder getInstance(List<String> classpath) { - return new JavaFinder(classpath); - } - - public ScriptEntry[] findMethods(File basedir) { - String parcelName; - ArrayList<ScriptEntry> result = new ArrayList<ScriptEntry>(10); - ScriptEntry[] empty = new ScriptEntry[0]; - - if (basedir == null || !basedir.exists() || - !basedir.isDirectory()) - return empty; - - parcelName = basedir.getName(); - - if (parcelName.equals(ParcelZipper.CONTENTS_DIRNAME)) - parcelName = basedir.getParentFile().getName(); - - String[] classNames = findClassNames(basedir); - - if (classNames != null && classNames.length != 0) { - - ClassLoader classloader; - - if (classpath == null) - classloader = getClassLoader(basedir); - else - classloader = getClassLoader(); - - for (int i = 0; i < classNames.length; i++) { - try { - Class clazz = classloader.loadClass(classNames[i]); - Method[] methods = clazz.getDeclaredMethods(); - - for (int k = 0; k < methods.length; k++) { - if (Modifier.isPublic(methods[k].getModifiers())) { - Class[] params = methods[k].getParameterTypes(); - - if (params.length > 0) { - if (params[0].getName().equals(FIRST_PARAM)) { - ScriptEntry entry = - new ScriptEntry(classNames[i] + "." + - methods[k].getName(), parcelName); - result.add(entry); - } - } - } - } - } catch (ClassNotFoundException e) { - System.err.println("Caught ClassNotFoundException loading: " - + classNames[i]); - continue; - } catch (NoClassDefFoundError nc) { - System.err.println("Caught NoClassDefFoundErr loading: " + - classNames[i]); - continue; - } - } - } - - if (result.size() != 0) - return result.toArray(empty); - - return empty; - } - - private ClassLoader getClassLoader() { - int len = classpath.size(); - ArrayList<URL> urls = new ArrayList<URL>(len); - - for (int i = 0; i < len; i++) { - try { - String s = classpath.get(i); - s = SVersionRCFile.toFileURL(s); - - if (s != null) - urls.add(new URL(s)); - } catch (MalformedURLException mue) { - } - } - - return new URLClassLoader(urls.toArray(new URL[urls.size()])); - } - - private ClassLoader getClassLoader(File basedir) { - ArrayList<File> files = findFiles(basedir, ".jar"); - files.add(basedir); - - try { - Iterator<OfficeInstallation> offices = - SVersionRCFile.createInstance().getVersions(); - - while (offices.hasNext()) { - OfficeInstallation oi = offices.next(); - String unoil = SVersionRCFile.getPathForUnoil(oi.getPath()); - - if (unoil != null) { - files.add(new File(unoil, "unoil.jar")); - break; - } - } - } catch (IOException ioe) { - return null; - } - - URL[] urls = new URL[files.size()]; - String urlpath; - File f; - - for (int i = 0; i < urls.length; i++) { - try { - f = files.get(i); - urlpath = SVersionRCFile.toFileURL(f.getAbsolutePath()); - - if (urlpath != null) - urls[i] = new URL(urlpath); - } catch (MalformedURLException mue) { - // do nothing, go on to next file - } - } - - return new URLClassLoader(urls); - } - - private ArrayList<File> findFiles(File basedir, String suffix) { - ArrayList<File> result = new ArrayList<File>(); - File[] children = basedir.listFiles(); - - for (int i = 0; i < children.length; i++) { - if (children[i].isDirectory()) - result.addAll(findFiles(children[i], suffix)); - else if (children[i].getName().endsWith(suffix)) - result.add(children[i]); - } - - return result; - } - - private String[] findClassNames(File basedir) { - ArrayList<File> classFiles = findFiles(basedir, CLASS_SUFFIX); - if(classFiles == null || classFiles.isEmpty()) - return null; - - ArrayList<File> javaFiles = findFiles(basedir, JAVA_SUFFIX); - - if (javaFiles == null || javaFiles.size() == 0) - return null; - - ArrayList<String> result = new ArrayList<String>(); - - for (int i = 0; i < classFiles.size(); i++) { - File classFile = classFiles.get(i); - String className = classFile.getName(); - className = className.substring(0, className.lastIndexOf(CLASS_SUFFIX)); - boolean finished = false; - - - for (int j = 0; j < javaFiles.size() && !finished; j++) { - File javaFile = javaFiles.get(j); - String javaName = javaFile.getName(); - javaName = javaName.substring(0, javaName.lastIndexOf(JAVA_SUFFIX)); - - if (javaName.equals(className)) { - String path = classFile.getAbsolutePath(); - path = path.substring(basedir.getAbsolutePath().length() + 1); - path = path.replace(File.separatorChar, '.'); - path = path.substring(0, path.lastIndexOf(CLASS_SUFFIX)); - - result.add(path); - javaFiles.remove(j); - finished = true; - } - } - } - - return result.toArray(new String[result.size()]); - } -} diff --git a/scripting/java/org/openoffice/idesupport/LocalOffice.java b/scripting/java/org/openoffice/idesupport/LocalOffice.java deleted file mode 100644 index 0c05cd097295..000000000000 --- a/scripting/java/org/openoffice/idesupport/LocalOffice.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.net.ConnectException; - -/** - * LocalOffice represents a connection to the local office. - * - * This class allows to get access to some scripting framework - * related functionality of the locally running office. The - * office has to be started with options appropriate for establishing - * local connection. - */ -public abstract class LocalOffice -{ - /** - * Connects to the running office. - * - * @param officePath is a platform specific path string - * to the office distribution. - * @param port is a communication port. - */ - protected abstract void connect(String officePath, int port) - throws ConnectException; - - /** - * Closes the connection to the running office. - */ - public abstract void disconnect(); - - /** - * Refresh the script storage. - * - * @param uri is an identifier of storage has to be refreshed. - */ - public abstract void refreshStorage(String uri); -} diff --git a/scripting/java/org/openoffice/idesupport/MethodFinder.java b/scripting/java/org/openoffice/idesupport/MethodFinder.java deleted file mode 100644 index 83e81b8d2233..000000000000 --- a/scripting/java/org/openoffice/idesupport/MethodFinder.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.io.File; -import com.sun.star.script.framework.container.ScriptEntry; - -public interface MethodFinder { - ScriptEntry[] findMethods(File basedir); -} diff --git a/scripting/java/org/openoffice/idesupport/OfficeDocument.java b/scripting/java/org/openoffice/idesupport/OfficeDocument.java deleted file mode 100644 index abad0ebbdd77..000000000000 --- a/scripting/java/org/openoffice/idesupport/OfficeDocument.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.zip.ZipEntry; -import java.util.zip.ZipException; -import java.util.zip.ZipFile; - -import org.openoffice.idesupport.zip.ParcelZipper; - -public class OfficeDocument { - public static final String PARCEL_PREFIX_DIR = - ParcelZipper.PARCEL_PREFIX_DIR; - - public static final String[] OFFICE_EXTENSIONS = - {".sxc" , ".sxw", ".sxi", ".sxd"}; - public static final String OFFICE_PRODUCT_NAME = "OpenOffice.org"; - - private File file = null; - - public OfficeDocument(File file) throws IllegalArgumentException { - if (!file.exists() || file.isDirectory() || !isOfficeFile(file)) { - throw new IllegalArgumentException("This is not a valid " + - OFFICE_PRODUCT_NAME + " document."); - } - - this.file = file; - } - - private boolean isOfficeFile(File file) { - for (int i = 0; i < OFFICE_EXTENSIONS.length; i++) - if (file.getName().endsWith(OFFICE_EXTENSIONS[i])) - return true; - - return false; - } - - public Iterator<String> getParcels() { - - ArrayList<String> parcels = new ArrayList<String>(); - ZipFile zp = null; - - try { - zp = new ZipFile(this.file); - - for (Enumeration enumer = zp.entries(); enumer.hasMoreElements();) { - ZipEntry ze = (ZipEntry)enumer.nextElement(); - - if (ze.getName().endsWith(ParcelZipper.PARCEL_DESCRIPTOR_XML)) { - String tmp = ze.getName(); - int end = tmp.lastIndexOf('/'); - tmp = tmp.substring(0, end); - - String parcelName = ze.getName().substring(0, end); - parcels.add(parcelName); - } - } - } catch (ZipException ze) { - ze.printStackTrace(); - } catch (IOException ioe) { - ioe.printStackTrace(); - } finally { - if (zp != null) { - try { - zp.close(); - } catch (IOException asdf) { - } - } - } - - return parcels.iterator(); - } - - public boolean removeParcel(String parcelName) { - - try { - ParcelZipper.getParcelZipper().removeParcel(file, parcelName); - } catch (IOException ioe) { - ioe.printStackTrace(); - return false; - } - - return true; - } -} diff --git a/scripting/java/org/openoffice/idesupport/OfficeInstallation.java b/scripting/java/org/openoffice/idesupport/OfficeInstallation.java deleted file mode 100644 index fdc89c9d12a1..000000000000 --- a/scripting/java/org/openoffice/idesupport/OfficeInstallation.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ -package org.openoffice.idesupport; - -import java.io.File; -import java.net.URLDecoder; - -public class OfficeInstallation implements java.io.Serializable { - - private String name; - private String path; - private String url; - private boolean hasFW = false; - - private static final String FILE_URL_PREFIX = SVersionRCFile.FILE_URL_PREFIX; - - public OfficeInstallation(String path) { - this(path, path); - } - - public OfficeInstallation(String name, String path) { - - this.name = name; - - if (path.startsWith(FILE_URL_PREFIX)) { - this.url = path; - path = URLDecoder.decode(path); - path = path.substring(FILE_URL_PREFIX.length()); - - if (System.getProperty("os.name").startsWith("Windows")) - path = path.replace('/', File.separatorChar); - - this.path = path; - } else { - this.path = path; - - if (System.getProperty("os.name").startsWith("Windows")) - path = path.replace(File.separatorChar, '/'); - - this.url = FILE_URL_PREFIX + path; - } - } - - public String getName() { - return name; - } - - public String getPath() { - return path; - } - - - - public String getURL() { - return url; - } - - - - - - public boolean supportsFramework() { - return true; - } - - @Override - public String toString() { - return getName(); - } -} diff --git a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java deleted file mode 100644 index 4e754e347c75..000000000000 --- a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.StringTokenizer; - -public class SVersionRCFile { - - private static final String DEFAULT_NAME = - System.getProperty("os.name").startsWith("Windows") ? - System.getProperty("user.home") + File.separator + - "Application Data" + File.separator + "sversion.ini" : - System.getProperty("user.home") + File.separator + - ".sversionrc"; - - public static final String FILE_URL_PREFIX = - System.getProperty("os.name").startsWith("Windows") ? - "file:///" : "file://"; - - - - private static final String VERSIONS_LINE = "[Versions]"; - - private static final String UNOILJAR = - "skip_registration" + File.separator + "unoil.jar"; - - private static final String UNOPACKAGEDIR = - File.separator + "user" + File.separator + "uno_packages" + - File.separator + "cache" + File.separator + "uno_packages"; - - /* Make sure this is in LowerCase !!!!! */ - private static final String SCRIPTF = "scriptf"; - - private static final HashMap<String, SVersionRCFile> files = new - HashMap<String, SVersionRCFile>(3); - - private File sversionrc = null; - private OfficeInstallation defaultversion = null; - private ArrayList<OfficeInstallation> versions = null; - private long lastModified = 0; - - public SVersionRCFile() { - this(DEFAULT_NAME); - } - - private SVersionRCFile(String name) { - sversionrc = new File(name); - versions = new ArrayList<OfficeInstallation>(5); - } - - public static SVersionRCFile createInstance() { - return (createInstance(DEFAULT_NAME)); - } - - private static SVersionRCFile createInstance(String name) { - SVersionRCFile result = null; - - synchronized (SVersionRCFile.class) { - result = files.get(name); - - if (result == null) { - result = new SVersionRCFile(name); - files.put(name, result); - } - } - - return result; - } - - public OfficeInstallation getDefaultVersion() throws IOException { - if (defaultversion == null) { - getVersions(); - } - - return defaultversion; - } - - public Iterator<OfficeInstallation> getVersions() throws IOException { - - long l = sversionrc.lastModified(); - - if (l > lastModified) { - BufferedReader br = null; - - try { - br = new BufferedReader(new FileReader(sversionrc)); - load(br); - lastModified = l; - } catch (FileNotFoundException fnfe) { - throw new IOException(fnfe.getMessage()); - } finally { - if (br != null) - br.close(); - } - } - - return versions.iterator(); - } - - private void load(BufferedReader br) throws IOException { - String s; - - while ((s = br.readLine()) != null && - !(s.equals(VERSIONS_LINE))) {} - - while ((s = br.readLine()) != null && - s.length() != 0) { - StringTokenizer tokens = new StringTokenizer(s, "="); - int count = tokens.countTokens(); - - if (count != 2) - continue; - - String name = tokens.nextToken(); - String path = tokens.nextToken(); - OfficeInstallation oi = new OfficeInstallation(name, path); - - if (oi.supportsFramework()) { - versions.add(oi); - defaultversion = oi; - } - } - } - - public static String toFileURL(String path) { - File f = new File(path); - - if (!f.exists()) - return null; - - try { - path = f.getCanonicalPath(); - } catch (IOException ioe) { - return null; - } - - if (System.getProperty("os.name").startsWith("Windows")) - path = path.replace(File.separatorChar, '/'); - - StringBuilder buf = new StringBuilder(FILE_URL_PREFIX); - buf.append(path); - - if (f.isDirectory()) - buf.append("/"); - - return buf.toString(); - } - - public static String getPathForUnoil(String officeInstall) { - File unopkgdir = new File(officeInstall, UNOPACKAGEDIR); - - if (!unopkgdir.exists()) { - return null; - } - - File scriptf = null; - String[] listunopkg = unopkgdir.list(); - int size = listunopkg.length; - - for (int i = 0; i < size; i++) { - if (listunopkg[i].toLowerCase().indexOf(SCRIPTF) > -1) { - scriptf = new File(unopkgdir, listunopkg[i]); - } - } - - if (scriptf != null) { - File unoil = new File(scriptf, UNOILJAR); - - if (unoil.exists()) { - String path = unoil.getParent(); - path = path.substring(path.indexOf(UNOPACKAGEDIR)); - return officeInstall + path; - } - } - - return null; - } - - public static void main(String[] args) { - SVersionRCFile ov; - - if (args.length == 0) - ov = new SVersionRCFile(); - else - ov = new SVersionRCFile(args[0]); - - Iterator<OfficeInstallation> enumer; - - try { - enumer = ov.getVersions(); - } catch (IOException ioe) { - System.err.println("Error getting versions: " + ioe.getMessage()); - return; - } - - while (enumer.hasNext()) { - OfficeInstallation oi = enumer.next(); - System.out.println("Name: " + oi.getName() + ", Path: " + oi.getPath() + - ", URL: " + oi.getURL()); - } - } -} diff --git a/scripting/java/org/openoffice/idesupport/filter/AllFilesFilter.java b/scripting/java/org/openoffice/idesupport/filter/AllFilesFilter.java deleted file mode 100644 index a27400342d6b..000000000000 --- a/scripting/java/org/openoffice/idesupport/filter/AllFilesFilter.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.filter; - -public class AllFilesFilter implements FileFilter { - private static final AllFilesFilter filter = new AllFilesFilter(); - - private AllFilesFilter() { - } - - public static AllFilesFilter getInstance() { - return filter; - } - - public boolean validate(String name) { - return true; - } - - @Override - public String toString() { - return "<all files>"; - } -} diff --git a/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java b/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java deleted file mode 100644 index 95436158bc6f..000000000000 --- a/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.filter; - -public class BinaryOnlyFilter implements FileFilter { - private static final String[] EXTENSIONS = {".class", ".jar", ".bsh"}; - private static final String DESCRIPTION = "Executable Files Only"; - private static final BinaryOnlyFilter filter = new BinaryOnlyFilter(); - - private BinaryOnlyFilter() { - } - - public static BinaryOnlyFilter getInstance() { - return filter; - } - public boolean validate(String name) { - for (int i = 0; i < EXTENSIONS.length; i++) - if (name.endsWith(EXTENSIONS[i])) - return true; - - return false; - } - - @Override - public String toString() { - return DESCRIPTION; - } -} diff --git a/scripting/java/org/openoffice/idesupport/filter/ExceptParcelFilter.java b/scripting/java/org/openoffice/idesupport/filter/ExceptParcelFilter.java deleted file mode 100644 index 25ce3562d638..000000000000 --- a/scripting/java/org/openoffice/idesupport/filter/ExceptParcelFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.filter; - -public class ExceptParcelFilter implements FileFilter { - private static final String DESCRIPTION = "Remove specified Parcel"; - private static final ExceptParcelFilter filter = new ExceptParcelFilter(); - private static String parcelName = null; - - private ExceptParcelFilter() { - } - - public void setParcelToRemove(String parcelName) { - ExceptParcelFilter.parcelName = parcelName; - } - - public static ExceptParcelFilter getInstance() { - return filter; - } - - public boolean validate(String name) { - return name.startsWith(ExceptParcelFilter.parcelName); - } - - @Override - public String toString() { - return DESCRIPTION + ": " + "<" + ExceptParcelFilter.parcelName + ">"; - } -} diff --git a/scripting/java/org/openoffice/idesupport/filter/FileFilter.java b/scripting/java/org/openoffice/idesupport/filter/FileFilter.java deleted file mode 100644 index f64a902ab255..000000000000 --- a/scripting/java/org/openoffice/idesupport/filter/FileFilter.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.filter; - -public interface FileFilter { - boolean validate(String name); -} diff --git a/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java b/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java deleted file mode 100644 index 3051b72bbfdd..000000000000 --- a/scripting/java/org/openoffice/idesupport/localoffice/LocalOfficeImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.localoffice; - -import java.net.ConnectException; - -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.bridge.UnoUrlResolver; -import com.sun.star.bridge.XUnoUrlResolver; -import com.sun.star.beans.XPropertySet; -import com.sun.star.comp.helper.Bootstrap; -import com.sun.star.uno.XComponentContext; -import com.sun.star.uno.UnoRuntime; -import drafts.com.sun.star.script.framework.storage.XScriptStorageManager; - -import org.openoffice.idesupport.LocalOffice; - -/** - * LocalOfficeImpl represents a connection to the local office. - * - * This class is an implementation of LocalOffice ane allows to - * get access to some scripting framework releated functionality - * of the locally running office. The office has to be started - * with options appropriate for establishing local connection. - */ -public final class LocalOfficeImpl - extends LocalOffice { - private final static String STORAGE_MRG_SINGLETON = - "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager"; - - private transient XMultiComponentFactory mComponentFactory; - private transient XComponentContext mComponentContext; - - /** - * Connects to the running office. - * - * @param officePath is a platform specific path string - * to the office distribution. - * @param port is a communication port. - */ - @Override - protected void connect(String officePath, int port) - throws ConnectException { - try { - bootstrap(port); - } catch (java.lang.Exception ex) { - throw new ConnectException(ex.getMessage()); - } - } - - /** - * Refresh the script storage. - * - * @param uri is an identifier of storage has to be refreshed. - */ - @Override - public void refreshStorage(String uri) { - try { - Object object = null; - object = mComponentContext.getValueByName(STORAGE_MRG_SINGLETON); - XScriptStorageManager storageMgr; - storageMgr = UnoRuntime.queryInterface( - XScriptStorageManager.class, object); - storageMgr.refreshScriptStorage(uri); - } catch (java.lang.Exception ex) { - System.out.println("*** LocalOfficeImpl.refreshStorage: FAILED " + - ex.getMessage()); - System.out.println("*** LocalOfficeImpl.refreshStorage: FAILED " + - ex.getClass().getName()); - } - - System.out.println("*** LocalOfficeImpl.refreshStorage: DONE"); - } - - /** - * Closes the connection to the running office. - */ - @Override - public void disconnect() { - /* - if(mComponentFactory != null) { - XComponent comp = (XComponent)UnoRuntime.queryInterface( - XComponent.class, mComponentFactory); - comp.dispose(); - } - */ - } - - /** - * Boot straps UNO. - * - * The office has to be started with following string: - * "--accept=socket,host=localhost,port=<PORT>;urp;StarOffice.ServiceManager" - * - * @param port is a communication port. - */ - private void bootstrap(int port) - throws java.lang.Exception { - Object object; - mComponentContext = Bootstrap.createInitialComponentContext(null); - XUnoUrlResolver urlresolver = UnoUrlResolver.create(mComponentContext); - object = urlresolver.resolve( - "uno:socket,host=localhost,port=" + - port + - ";urp;StarOffice.ServiceManager"); - mComponentFactory = UnoRuntime.queryInterface( - XMultiComponentFactory.class, object); - XPropertySet factoryProps; - factoryProps = UnoRuntime.queryInterface( - XPropertySet.class, mComponentFactory); - object = factoryProps.getPropertyValue("DefaultContext"); - mComponentContext = UnoRuntime.queryInterface( - XComponentContext.class, object); - } -} diff --git a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java deleted file mode 100644 index 4098dca61f0e..000000000000 --- a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.ui; - -import java.awt.BorderLayout; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; - -import javax.swing.AbstractButton; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JPanel; -import javax.swing.border.LineBorder; - -import org.openoffice.idesupport.zip.ParcelZipper; - -import com.sun.star.script.framework.container.ParcelDescriptor; -import com.sun.star.script.framework.container.ScriptEntry; - -public class ConfigurePanel extends JPanel { - - private File basedir; - private ArrayList<String> classpath; - private ParcelDescriptor descriptor; - - private MethodPanel methodPanel; - private ScriptPanel scriptPanel; - - public static final String DIALOG_TITLE = - "Choose What to Export as Scripts"; - - public ConfigurePanel(String basedir, ArrayList<String> classpath, - ParcelDescriptor descriptor) { - - this.basedir = new File(basedir); - this.classpath = classpath; - this.descriptor = descriptor; - initUI(); - } - - public ConfigurePanel(String basedir, ArrayList<String> classpath) - throws IOException { - - this.basedir = new File(basedir); - this.classpath = classpath; - this.descriptor = new ParcelDescriptor(new File(this.basedir, - ParcelZipper.PARCEL_DESCRIPTOR_XML)); - initUI(); - } - - public void reload(String basedir, ArrayList<String> classpath, - ParcelDescriptor descriptor) { - - if (basedir != null) - this.basedir = new File(basedir); - - if (classpath != null) - this.classpath = classpath; - - if (descriptor != null) { - this.descriptor = descriptor; - } - - methodPanel.reload(this.basedir, this.classpath, - descriptor.getLanguage()); - scriptPanel.reload(descriptor.getScriptEntries()); - } - - public void reload(String basedir, ArrayList<String> classpath) - throws IOException { - - if (basedir != null) - this.basedir = new File(basedir); - - if (classpath != null) - this.classpath = classpath; - - this.descriptor = new ParcelDescriptor(new File(this.basedir, - ParcelZipper.PARCEL_DESCRIPTOR_XML)); - - methodPanel.reload(this.basedir, this.classpath, - descriptor.getLanguage()); - scriptPanel.reload(descriptor.getScriptEntries()); - } - - public ParcelDescriptor getConfiguration() throws Exception { - Iterator<ScriptEntry> scripts = scriptPanel.getScriptEntries(); - descriptor.setScriptEntries(scripts); - return descriptor; - } - - private void initUI() { - - JPanel leftPanel = new JPanel(); - JPanel methodButtons = initMethodButtons(); - methodPanel = new MethodPanel(basedir, classpath, descriptor.getLanguage()); - - leftPanel.setLayout(new BorderLayout()); - leftPanel.add(methodPanel, BorderLayout.CENTER); - - JPanel rightPanel = new JPanel(); - JPanel scriptButtons = initScriptButtons(); - scriptPanel = new ScriptPanel(descriptor.getScriptEntries()); - - rightPanel.setLayout(new BorderLayout()); - rightPanel.add(scriptPanel, BorderLayout.CENTER); - rightPanel.add(scriptButtons, BorderLayout.SOUTH); - - setLayout(new GridBagLayout()); - setPreferredSize(new java.awt.Dimension(700, 300)); - setBorder(LineBorder.createBlackLineBorder()); - - GridBagConstraints gbc = new GridBagConstraints(); - gbc.gridx = 0; - gbc.gridy = 0; - gbc.fill = java.awt.GridBagConstraints.BOTH; - gbc.ipadx = 40; - gbc.anchor = java.awt.GridBagConstraints.WEST; - gbc.insets = new Insets(10, 5, 5, 5); - gbc.weightx = 0.75; - add(leftPanel, gbc); - - gbc = new java.awt.GridBagConstraints(); - gbc.gridx = 1; - gbc.gridy = 0; - add(methodButtons, gbc); - - gbc = new java.awt.GridBagConstraints(); - gbc.gridx = 2; - gbc.gridy = 0; - gbc.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gbc.fill = java.awt.GridBagConstraints.BOTH; - gbc.anchor = java.awt.GridBagConstraints.EAST; - gbc.insets = new Insets(10, 5, 5, 5); - gbc.weightx = 1.0; - gbc.weighty = 1.0; - add(rightPanel, gbc); - } - - private JPanel initMethodButtons() { - JPanel panel = new JPanel(); - panel.setLayout(new GridBagLayout()); - ImageIcon icon = new ImageIcon( - getClass().getResource("/org/openoffice/idesupport/ui/add.gif")); - JButton addButton = new JButton("Add", icon); - addButton.setHorizontalTextPosition(AbstractButton.LEFT); - - addButton.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - scriptPanel.addScriptEntries(methodPanel.getSelectedEntries()); - } - } - ); - - GridBagConstraints gbc = new java.awt.GridBagConstraints(); - gbc.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gbc.fill = java.awt.GridBagConstraints.HORIZONTAL; - gbc.insets = new Insets(5, 5, 5, 5); - panel.add(addButton, gbc); - - JPanel dummyPanel = new JPanel(); - gbc = new java.awt.GridBagConstraints(); - gbc.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gbc.gridheight = java.awt.GridBagConstraints.REMAINDER; - gbc.fill = java.awt.GridBagConstraints.BOTH; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - panel.add(dummyPanel, gbc); - - return panel; - } - - private JPanel initScriptButtons() { - JPanel panel = new JPanel(); - JButton removeButton = new JButton("Remove"); - JButton removeAllButton = new JButton("Remove All"); - - removeButton.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - scriptPanel.removeSelectedRows(); - } - } - ); - - removeAllButton.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - scriptPanel.removeAllRows(); - } - } - ); - - panel.add(removeButton); - panel.add(removeAllButton); - - return panel; - } -} diff --git a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java deleted file mode 100644 index 9bedf5184c34..000000000000 --- a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.ui; - -import java.awt.BorderLayout; -import java.io.File; -import java.util.ArrayList; - -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.JScrollPane; - -import org.openoffice.idesupport.ExtensionFinder; -import org.openoffice.idesupport.JavaFinder; -import org.openoffice.idesupport.MethodFinder; - -import com.sun.star.script.framework.container.ScriptEntry; - -public class MethodPanel extends JPanel { - - private File basedir; - private ArrayList<String> classpath; - - private JList list; - private ScriptEntry[] values; - - public MethodPanel(File basedir, ArrayList<String> classpath, String language) { - this.basedir = basedir; - this.classpath = classpath; - - initValues(language); - initUI(); - } - - public void reload(File basedir, ArrayList<String> classpath, String language) { - this.basedir = basedir; - this.classpath = classpath; - - initValues(language); - list.setListData(values); - } - - public ScriptEntry[] getSelectedEntries() { - Object[] selections = list.getSelectedValues(); - ScriptEntry[] entries = new ScriptEntry[selections.length]; - - for (int i = 0; i < selections.length; i++) { - entries[i] = (ScriptEntry)selections[i]; - } - - return entries; - } - - private void initUI() { - JLabel label = new JLabel("Available Methods:"); - list = new JList(values); - - JScrollPane pane = new JScrollPane(list); - label.setLabelFor(pane); - - BorderLayout layout = new BorderLayout(); - setLayout(layout); - layout.setVgap(5); - - add(label, BorderLayout.NORTH); - add(pane, BorderLayout.CENTER); - } - - private void initValues(String language) { - MethodFinder finder; - - if (language == null) - finder = JavaFinder.getInstance(classpath); - else if (language.equalsIgnoreCase("beanshell")) - finder = new ExtensionFinder(language, new String[] {".bsh"}); - else - finder = JavaFinder.getInstance(classpath); - - values = finder.findMethods(basedir); - } - - /* - private class MethodTableModel extends AbstractTableModel { - final String[] columnNames = {"Method", - "Language"}; - - private ArrayList methods; - private int nextRow; - - public MethodTableModel() { - methods = new ArrayList(11); - } - - public int getColumnCount() { - return columnNames.length; - } - - public int getRowCount() { - return methods.size(); - } - - public String getColumnName(int col) { - return columnNames[col]; - } - - public void add(ScriptEntry entry) { - methods.addElement(entry); - fireTableRowsInserted(nextRow, nextRow); - nextRow++; - } - - public void remove(int row) { - methods.removeElementAt(row); - fireTableRowsDeleted(row, row); - nextRow--; - } - - public void removeAll() { - methods.removeAllElements(); - fireTableRowsDeleted(0, nextRow); - nextRow = 0; - } - - public Object getValueAt(int row) { - return methods.elementAt(row); - } - - public Object getValueAt(int row, int col) { - String result = ""; - ScriptEntry entry; - - entry = (ScriptEntry)methods.elementAt(row); - - if (col == 0) - result = entry.getLanguageName(); - else if (col == 1) - result = entry.getLanguage(); - - return result; - } - - public boolean isCellEditable(int row, int col) { - return false; - } - } - */ -} diff --git a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java deleted file mode 100644 index c25b5fb04660..000000000000 --- a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.ui; - -import java.awt.BorderLayout; -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; -import java.util.ArrayList; -import java.util.Iterator; - -import javax.swing.DefaultCellEditor; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTable; -import javax.swing.JTextField; -import javax.swing.table.AbstractTableModel; -import javax.swing.table.TableCellEditor; -import javax.swing.table.TableColumn; - -import com.sun.star.script.framework.container.ScriptEntry; - -public class ScriptPanel extends JPanel { - private ScriptTableModel model; - private JTable table; - - public ScriptPanel(ScriptEntry[] scripts) { - model = new ScriptTableModel(scripts); - initUI(); - } - - public void reload(ScriptEntry[] entries) { - model.removeAll(); - addScriptEntries(entries); - } - - public void addScriptEntries(ScriptEntry[] entries) { - for (int i = 0; i < entries.length; i++) { - ScriptEntry entry; - - try { - entry = (ScriptEntry) entries[i].clone(); - } catch (CloneNotSupportedException cnse) { - entry = new ScriptEntry(entries[i].getLanguage(), - entries[i].getLanguageName(), - entries[i].getLocation()); - } - - model.add(entry); - } - } - - public void removeSelectedRows() { - int[] selections = table.getSelectedRows(); - - for (int i = selections.length - 1; i >= 0; i--) { - model.remove(selections[i]); - } - } - - public void removeAllRows() { - model.removeAll(); - } - - public Iterator<ScriptEntry> getScriptEntries() { - return model.getScriptEntries(); - } - - private void initUI() { - table = new JTable(model); - TableColumn column = table.getColumnModel().getColumn(1); - column.setCellEditor(new DefaultCellEditor(new JTextField())); - - table.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent evt) { - tableFocusLost(); - } - }); - - JScrollPane pane = new JScrollPane(table); - JLabel label = new JLabel("Scripts:"); - label.setLabelFor(pane); - - BorderLayout layout = new BorderLayout(); - setLayout(layout); - layout.setVgap(5); - add(label, BorderLayout.NORTH); - add(pane, BorderLayout.CENTER); - } - - private void tableFocusLost() { - TableCellEditor editor = table.getCellEditor(); - - if (editor != null) { - Object value = editor.getCellEditorValue(); - - if (value != null) - model.setValueAt(value, - table.getEditingRow(), table.getEditingColumn()); - } - } - - private class ScriptTableModel extends AbstractTableModel { - final String[] columnNames = {"Exported Method", - "Script Name" - }; - - private ArrayList<ScriptEntry> scripts; - private int nextRow; - - public ScriptTableModel(ScriptEntry[] entries) { - scripts = new ArrayList<ScriptEntry>(entries.length + 11); - - for (int i = 0; i < entries.length; i++) { - scripts.add(entries[i]); - } - - nextRow = entries.length; - } - - public int getColumnCount() { - return columnNames.length; - } - - public int getRowCount() { - return scripts.size(); - } - - @Override - public String getColumnName(int col) { - return columnNames[col]; - } - - public void add(ScriptEntry entry) { - scripts.add(entry); - fireTableRowsInserted(nextRow, nextRow); - nextRow++; - } - - public void remove(int row) { - scripts.remove(row); - fireTableRowsDeleted(row, row); - nextRow--; - } - - public void removeAll() { - scripts.clear(); - fireTableRowsDeleted(0, nextRow); - nextRow = 0; - } - - public Iterator<ScriptEntry> getScriptEntries() { - return scripts.iterator(); - } - - public Object getValueAt(int row, int col) { - String result = ""; - ScriptEntry entry; - - entry = scripts.get(row); - - if (col == 0) - result = entry.getLanguageName(); - else if (col == 1) - result = entry.getLogicalName(); - - return result; - } - - @Override - public boolean isCellEditable(int row, int col) { - return (col != 0); - } - - @Override - public void setValueAt(Object value, int row, int col) { - ScriptEntry entry = scripts.get(row); - entry.setLogicalName((String)value); - fireTableCellUpdated(row, col); - } - } -} diff --git a/scripting/java/org/openoffice/idesupport/ui/add.gif b/scripting/java/org/openoffice/idesupport/ui/add.gif Binary files differdeleted file mode 100644 index e47c986ccf1f..000000000000 --- a/scripting/java/org/openoffice/idesupport/ui/add.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/idesupport/xml/Manifest.java b/scripting/java/org/openoffice/idesupport/xml/Manifest.java deleted file mode 100644 index 492df63b75ea..000000000000 --- a/scripting/java/org/openoffice/idesupport/xml/Manifest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.xml; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import java.util.ArrayList; -import java.util.Iterator; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; - -import com.sun.star.script.framework.container.XMLParserFactory; - -public class Manifest { - - private Document document = null; - private boolean baseElementsExist = false; - - public Manifest(InputStream inputStream) throws IOException { - document = XMLParserFactory.getParser().parse(inputStream); - } - - public void add(String entry) { - add(entry, ""); - } - - private void add(String entry, String type) { - Element root, el; - - ensureBaseElementsExist(); - - try { - root = (Element) - document.getElementsByTagName("manifest:manifest").item(0); - - el = document.createElement("manifest:file-entry"); - el.setAttribute("manifest:media-type", type); - el.setAttribute("manifest:full-path", entry); - root.appendChild(el); - } catch (Exception e) { - System.err.println("Error adding entry: " + e.getMessage()); - } - } - - private void ensureBaseElementsExist() { - if (!baseElementsExist) { - baseElementsExist = true; - add("Scripts/", "application/script-parcel"); - } - } - - public void remove(String entry) { - Element root, el; - int len; - - try { - root = (Element) - document.getElementsByTagName("manifest:manifest").item(0); - - NodeList nl = root.getElementsByTagName("manifest:file-entry"); - - if (nl == null || (len = nl.getLength()) == 0) - return; - - ArrayList<Element> list = new ArrayList<Element>(); - - for (int i = 0; i < len; i++) { - el = (Element)nl.item(i); - - if (el.getAttribute("manifest:full-path").startsWith(entry)) { - list.add(el); - } - } - - Iterator iter = list.iterator(); - - while (iter.hasNext()) - root.removeChild((Element)iter.next()); - } catch (Exception e) { - System.err.println("Error removing entry: " + e.getMessage()); - } - } - - public InputStream getInputStream() throws IOException { - InputStream result = null; - ByteArrayOutputStream out = null; - - try { - out = new ByteArrayOutputStream(); - write(out); - result = new ByteArrayInputStream(out.toByteArray()); - } finally { - if (out != null) - out.close(); - } - - return result; - } - - private void write(OutputStream out) throws IOException { - XMLParserFactory.getParser().write(document, out); - } -} diff --git a/scripting/java/org/openoffice/idesupport/zip/ParcelZipper.java b/scripting/java/org/openoffice/idesupport/zip/ParcelZipper.java deleted file mode 100644 index 3c8d797f220c..000000000000 --- a/scripting/java/org/openoffice/idesupport/zip/ParcelZipper.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.idesupport.zip; - -import java.io.*; -import java.util.zip.*; -import org.openoffice.idesupport.filter.FileFilter; -import org.openoffice.idesupport.filter.BinaryOnlyFilter; -import org.openoffice.idesupport.xml.Manifest; - -public class ParcelZipper { - public static final String PARCEL_PREFIX_DIR = "Scripts/"; - private static final String PARCEL_EXTENSION = "sxp"; - public static final String CONTENTS_DIRNAME = "Contents"; - public static final String PARCEL_DESCRIPTOR_XML = "parcel-descriptor.xml"; - - private static ParcelZipper zipper = null; - - private static final FileFilter DEFAULT_FILTER = - BinaryOnlyFilter.getInstance(); - - private ParcelZipper() { - } - - public static synchronized ParcelZipper getParcelZipper() { - if (zipper == null) - zipper = new ParcelZipper(); - - return zipper; - } - - - - - - - - public String removeParcel(File document, String parcelName) - throws IOException { - - ZipInputStream documentStream = null; - ZipOutputStream outStream = null; - Manifest manifest = null; - - if (!parcelName.startsWith(PARCEL_PREFIX_DIR)) - parcelName = PARCEL_PREFIX_DIR + parcelName; - - manifest = removeParcelFromManifest(document, parcelName); - - // first write contents of document to tmpfile - File tmpfile = new File(document.getAbsolutePath() + ".tmp"); - - try { - ZipEntry outEntry; - ZipEntry inEntry; - byte[] bytes = new byte[1024]; - int len; - - documentStream = new ZipInputStream(new FileInputStream(document)); - outStream = new ZipOutputStream(new FileOutputStream(tmpfile)); - - while ((inEntry = documentStream.getNextEntry()) != null) { - - if (inEntry.getName().startsWith(parcelName)) - continue; - - outEntry = new ZipEntry(inEntry); - outStream.putNextEntry(outEntry); - - if (inEntry.getName().equals("META-INF/manifest.xml") && - manifest != null) { - InputStream manifestStream = null; - - try { - manifestStream = manifest.getInputStream(); - - while ((len = manifestStream.read(bytes)) != -1) - outStream.write(bytes, 0, len); - } finally { - if (manifestStream != null) - manifestStream.close(); - } - } else if (!inEntry.isDirectory()) { - while ((len = documentStream.read(bytes)) != -1) - outStream.write(bytes, 0, len); - } - - outStream.closeEntry(); - } - } catch (IOException ioe) { - tmpfile.delete(); - throw ioe; - } finally { - if (documentStream != null) - documentStream.close(); - - if (outStream != null) - outStream.close(); - } - - if (!document.delete()) { - tmpfile.delete(); - throw new IOException("Could not overwrite " + document); - } else - tmpfile.renameTo(document); - - return document.getAbsolutePath(); - } - - private Manifest getManifestFromDocument(File document) { - ZipFile documentZip = null; - Manifest result = null; - - try { - documentZip = new ZipFile(document); - ZipEntry original = documentZip.getEntry("META-INF/manifest.xml"); - - if (original != null) { - result = new Manifest(documentZip.getInputStream(original)); - } - } catch (IOException ioe) { - } finally { - try { - if (documentZip != null) - documentZip.close(); - } catch (IOException ioe) {} - } - - return result; - } - - private Manifest removeParcelFromManifest(File document, String name) { - Manifest result = null; - - result = getManifestFromDocument(document); - - if (result == null) - return null; - - result.remove(name); - return result; - } -} diff --git a/scripting/java/org/openoffice/netbeans/editor/JavaKit.java b/scripting/java/org/openoffice/netbeans/editor/JavaKit.java deleted file mode 100644 index 1a3b6abddd17..000000000000 --- a/scripting/java/org/openoffice/netbeans/editor/JavaKit.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ -package org.openoffice.netbeans.editor; - -import java.io.*; -import java.awt.event.KeyEvent; -import java.awt.event.InputEvent; -import java.awt.event.ActionEvent; -import java.net.URL; -import java.text.MessageFormat; - -import java.util.Map; -import java.util.List; -import java.util.ResourceBundle; -import java.util.MissingResourceException; -import javax.swing.KeyStroke; -import javax.swing.JEditorPane; -import javax.swing.JMenuItem; -import javax.swing.Action; -import javax.swing.text.Document; -import javax.swing.text.JTextComponent; -import javax.swing.text.TextAction; -import javax.swing.text.BadLocationException; -import org.netbeans.editor.*; -import org.netbeans.editor.ext.*; -import org.netbeans.editor.ext.java.*; - -/** -* Java editor kit with appropriate document -* -* @version 1.00 -*/ - -/* This class is based on the JavaKit class in the demosrc directory of - * the editor module of the NetBeans project: http://www.netbeans.org - * - * The class sets up an EditorKit for syntax highlighting and code completion - * of Java syntax - */ - -public class JavaKit extends ExtKit { - - public static final String JAVA_MIME_TYPE = "text/x-java"; // NOI18N - - static final long serialVersionUID = -5445829962533684922L; - - static { - Settings.addInitializer(new JavaSettingsInitializer(JavaKit.class)); - Settings.reset(); - - URL skeleton = null, body = null; - skeleton = JavaKit.class.getResource("OOo.jcs"); - body = JavaKit.class.getResource("OOo.jcb"); - - if (skeleton != null && body != null) { - DAFileProvider provider = new DAFileProvider( - new URLAccessor(skeleton), - new URLAccessor(body)); - - JCBaseFinder finder = new JCBaseFinder(); - finder.append(provider); - JavaCompletion.setFinder(finder); - } - } - - public String getContentType() { - return JAVA_MIME_TYPE; - } - - /** Create new instance of syntax coloring scanner - * @param doc document to operate on. It can be null in the cases the syntax - * creation is not related to the particular document - */ - public Syntax createSyntax(Document doc) { - return new JavaSyntax(); - } - - /** Create syntax support */ - public SyntaxSupport createSyntaxSupport(BaseDocument doc) { - return new JavaSyntaxSupport(doc); - } - - public Completion createCompletion(ExtEditorUI extEditorUI) { - return new JavaCompletion(extEditorUI); - } - - /** Create the formatter appropriate for this kit */ - public Formatter createFormatter() { - return new JavaFormatter(this.getClass()); - } - - protected EditorUI createEditorUI() { - return new ExtEditorUI(); - } - - protected void initDocument(BaseDocument doc) { - doc.addLayer(new JavaDrawLayerFactory.JavaLayer(), - JavaDrawLayerFactory.JAVA_LAYER_VISIBILITY); - doc.addDocumentListener(new JavaDrawLayerFactory.LParenWatcher()); - } - - /** - * DataAccessor for parser DB files via URL streams - */ - public static class URLAccessor implements DataAccessor { - - URL url; - InputStream stream; - int streamOff; - int actOff; - - public URLAccessor(URL url) { - this.url = url; - } - - /** Not implemented - */ - public void append(byte[] buffer, int off, int len) - throws IOException { - throw new IllegalArgumentException("read only!"); - } - - /** - * Reads exactly <code>len</code> bytes from this file resource - * into the byte array, starting at the current file pointer. - * This method reads repeatedly from the file until the requested - * number of bytes are read. This method blocks until the requested - * number of bytes are read, the end of the inputStream is detected, - * or an exception is thrown. - * - * @param buffer the buffer into which the data is read. - * @param off the start offset of the data. - * @param len the number of bytes to read. - */ - public void read(byte[] buffer, int off, int len) throws IOException { - InputStream str = getStream(actOff); - - while (len > 0) { - int count = str.read(buffer, off, len); - streamOff += count; - off += count; - len -= count; - } - } - - /** Opens DataAccessor file resource - * @param requestWrite if true, file is opened for read/write - */ - public void open(boolean requestWrite) throws IOException { - if (requestWrite) - throw new IllegalArgumentException("read only!"); - } - - /** Closes DataAccessor file resource */ - public void close() throws IOException { - if (stream != null) { - stream.close(); - stream = null; - } - } - - /** - * Returns the current offset in this file. - * - * @return the offset from the beginning of the file, in bytes, - * at which the next read or write occurs. - */ - public long getFilePointer() throws IOException { - return actOff; - } - - /** Clears the file and sets the offset to 0 */ - public void resetFile() throws IOException { - throw new IllegalArgumentException("read only!"); - } - - /** - * Sets the file-pointer offset, measured from the beginning of this - * file, at which the next read or write occurs. - */ - public void seek(long pos) throws IOException { - actOff = (int)pos; - } - - /** Gets InputStream prepared for reading from <code>off</code> - * offset position - */ - private InputStream getStream(int off) throws IOException { - if (streamOff > off && stream != null) { - stream.close(); - stream = null; - } - - if (stream == null) { - stream = url.openStream(); - streamOff = 0; - } - - while (streamOff < off) { - long len = stream.skip(off - streamOff); - streamOff += (int)len; - - if (len == 0) throw new IOException("EOF"); - } - - return stream; - } - - public int getFileLength() { - try { - int l = url.openConnection().getContentLength(); - return l; - } catch (IOException e) { - return 0; - } - } - - public String toString() { - return url.toString(); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java b/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java deleted file mode 100644 index 19388fd8f82f..000000000000 --- a/scripting/java/org/openoffice/netbeans/editor/NetBeansSourceView.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ -package org.openoffice.netbeans.editor; - -import javax.swing.*; -import javax.swing.text.Document; -import javax.swing.event.DocumentListener; -import javax.swing.event.DocumentEvent; - -import java.io.*; -import java.util.ResourceBundle; - -import javax.swing.text.Caret; -import org.netbeans.editor.*; -import org.netbeans.editor.ext.*; - -import com.sun.star.script.framework.provider.beanshell.ScriptSourceView; -import com.sun.star.script.framework.provider.beanshell.ScriptSourceModel; - -public class NetBeansSourceView extends JPanel - implements ScriptSourceView, DocumentListener { - - private ScriptSourceModel model; - private JEditorPane pane; - private boolean isModified = false; - - static { - // Feed our kits with their default Settings - Settings.addInitializer( - new BaseSettingsInitializer(), Settings.CORE_LEVEL); - Settings.addInitializer( - new ExtSettingsInitializer(), Settings.CORE_LEVEL); - Settings.reset(); - - try { - Class kitClass = Class.forName( - NetBeansSourceView.class.getPackage().getName() + ".JavaKit"); - - JEditorPane.registerEditorKitForContentType( - "text/x-java", kitClass.getName(), kitClass.getClassLoader()); - } catch (ClassNotFoundException exc) { - } - } - - private class MyLocalizer implements LocaleSupport.Localizer { - private ResourceBundle bundle; - - public MyLocalizer(String bundleName) { - bundle = ResourceBundle.getBundle(bundleName); - } - - // Localizer - public String getString(String key) { - return bundle.getString(key); - } - } - - public NetBeansSourceView(ScriptSourceModel model) { - this.model = model; - - LocaleSupport.addLocalizer( - new MyLocalizer("org.netbeans.editor.Bundle")); - - pane = new JEditorPane("text/x-java", ""); - pane.setText(model.getText()); - - JScrollPane spane = new JScrollPane(); - spane.setViewportView(pane); - setLayout(new java.awt.GridLayout(1, 1)); - add(spane); - - pane.getDocument().addDocumentListener(this); - } - - public static void main(String[] args) { - if (args.length < 1) { - System.err.println("No file specified"); - System.exit(-1); - } - - File f = new File(args[0]); - - if (!f.exists() || !f.isFile()) { - System.err.println("Invalid file"); - System.exit(-1); - } - - java.net.URL url = null; - - try { - url = f.toURL(); - } catch (java.net.MalformedURLException mue) { - System.err.println("Invalid file"); - System.exit(-1); - } - - NetBeansSourceView view = - new NetBeansSourceView(new ScriptSourceModel(url)); - - JFrame frame = new JFrame(); - frame.getContentPane().add(view); - frame.setSize(640, 480); - frame.show(); - } - - // Code grabbed from NetBeans editor module - public void scrollToLine(int line) { - BaseDocument doc = Utilities.getDocument(pane); - - int pos = -1; - - if (doc != null) { - // Obtain the offset where to jump - pos = Utilities.getRowStartFromLineOffset(doc, line); - } - - if (pos != -1) { - Caret caret = pane.getCaret(); - - if (caret instanceof BaseCaret) { // support extended scroll mode - BaseCaret bCaret = (BaseCaret)caret; - bCaret.setDot(pos, bCaret, EditorUI.SCROLL_FIND); - } else { - caret.setDot(pos); - } - } - } - - public void clear() { - pane.setText(""); - } - - public void update() { - /* Remove ourselves as a DocumentListener while loading the source - so we don't get a storm of DocumentEvents during loading */ - pane.getDocument().removeDocumentListener(this); - - if (!isModified) { - pane.setText(model.getText()); - } - - // scroll to current position of the model - try { - scrollToLine(model.getCurrentPosition()); - } catch (Exception e) { - // couldn't scroll to line, do nothing - } - - // Add back the listener - pane.getDocument().addDocumentListener(this); - } - - public boolean isModified() { - return isModified; - } - - public void setModified(boolean value) { - isModified = value; - } - - public String getText() { - return pane.getText(); - } - - /* Implementation of DocumentListener interface */ - public void insertUpdate(DocumentEvent e) { - doChanged(e); - } - - public void removeUpdate(DocumentEvent e) { - doChanged(e); - } - - public void changedUpdate(DocumentEvent e) { - doChanged(e); - } - - public void doChanged(DocumentEvent e) { - isModified = true; - } - -} diff --git a/scripting/java/org/openoffice/netbeans/editor/OOo.jcb b/scripting/java/org/openoffice/netbeans/editor/OOo.jcb deleted file mode 100644 index 7286934fae65..000000000000 --- a/scripting/java/org/openoffice/netbeans/editor/OOo.jcb +++ /dev/null @@ -1,5 +0,0 @@ -LABELED_BYshortSPLIT_PANEshortHYPER_LINKshortPOPUP_MENUshortGLASS_PANEshortTABLE_CELLshortTEXT_FRAMEshortSTATUS_BARshortROW_HEADERshortSCROLL_BARshortSELECTABLEshortEXPANDABLEshortMULTI_LINEshortHORIZONTALshortLastColumnintSegmentEndintdeleteTextbooleaninsertTextbooleanADJUST_ABScom.sun.star.awt.AdjustmentTypegetDefaultcom.sun.star.awt.AdjustmentTypeRightInsetintFocusFlagsshortDECORATIVEshortNONE_valueintgetDefaultcom.sun.star.awt.FontSlantBOLDDOTTEDshortDOUBLEWAVEshortDASHDOTDOTshortNORMALfloatULTRALIGHTfloat
ULTRAEXPANDEDfloatStartColorintRECT_valueintELLIPTICALcom.sun.star.awt.GradientStylegetDefaultcom.sun.star.awt.GradientStyleNOCHILDRENshortPROPERTIESshortPROPERTIESshortRADIOCHECKshortClickCountintUpdateRectcom.sun.star.awt.RectangleEXECUTE_UPshortHELP_valueintgetDefaultcom.sun.star.awt.PushButtonTypeZEROBITS com.sun.star.awt.RasterOperationgetDefault com.sun.star.awt.RasterOperationHORIZONTALintNOTALLOWEDintDEF_CANCELintgetDefaultcom.sun.star.awt.WindowClassRightInsetintgetMaskDIBbytecreatePeervoidgetContextjava.lang.Object setContextvoidgetControlcom.sun.star.awt.XControladdControlvoidendExecutevoidsetFiltersvoidselectFontvoidkeyPressedbooleankeyPressedvoidselectItemvoidinsertItemvoidgetItemPosshortremoveItemvoidenableItemvoiddeactivatevoidmouseMovedvoidselectFormvoidupdateTextvoidremoveTextvoidgetMaximumintsetMaximumvoidisEditablebooleaninsertTextvoidsetMenuBarvoidgetWindowscom.sun.star.awt.XWindowgetPosSizecom.sun.star.awt.RectanglesetPosSizevoidsetVisiblevoidinvalidatevoidsetPointervoidgetToolkitcom.sun.star.awt.XToolkitAttributesshortREADONLYshortREMOVEABLEshortATTRIBUTESintgetDefault com.sun.star.beans.PropertyStategetStringsjava.lang.String setStringsvoidgetMethods"com.sun.star.reflection.XIdlMethod.lib.uno.typeinfo.TypeInfoAUTO_valueintgetDefault,com.sun.star.chart.ChartAxisArrangeOrderTypeDATA_RANGE&com.sun.star.chart.ChartDataChangeTypegetDefault&com.sun.star.chart.ChartDataChangeTypeROWS_valueintgetDefault%com.sun.star.chart.ChartDataRowSourceNONE_valueintgetDefault%com.sun.star.chart.ChartErrorCategoryNONE_valueintgetDefault*com.sun.star.chart.ChartErrorIndicatorType -NONE_valueintLEFT_valueintgetDefault&com.sun.star.chart.ChartLegendPositionNONE_valueintPOLYNOMIAL+com.sun.star.chart.ChartRegressionCurveTypegetDefault+com.sun.star.chart.ChartRegressionCurveTypegetDiagramcom.sun.star.chart.XDiagramsetDiagramvoidattachDatavoidgetDownBarcom.sun.star.beans.XPropertySet__waitTimeint_otherSide-com.sun.star.comp.connections.PipedConnectionm_lateInitjava.lang.Object initializevoidm_manifestjava.lang.String initializevoidEXTENSIBLEshortlistLayers)com.sun.star.configuration.backend.XLayer"startLayervoidreadSchemavoidstartGroupvoidremoveNodevoidmodifyNodevoidtar.container.XElementAccessUNOTYPEINFO&com.sun.star.lib.uno.typeinfo.TypeInfogetByIndexjava.lang.Object request_idintrequest_idintrequest_idintrequest_idintobject_keybytegetDefault,com.sun.star.corba.giop.LocateStatusType_1_2byte_orderbooleangetDefault#com.sun.star.corba.giop.MsgType_1_1request_idintgetDefault+com.sun.star.corba.giop.ReplyStatusType_1_2service_context%com.sun.star.corba.iop.ServiceContextobject_keybyterequest_idintreserved_2byterequest_idintreserved_3byteobject_keybytereserved_1byteservice_context%com.sun.star.corba.iop.ServiceContextreserved_2bytereserved_1byterequest_idintreserved_3byteobject_keybyteobject_keybytecomponents&com.sun.star.corba.iop.TaggedComponentobject_keybytecontext_idinttk_booleancom.sun.star.corba.TCKindtk_wstringcom.sun.star.corba.TCKindgetDefaultcom.sun.star.corba.TCKindPersistantbyteDragSource)com.sun.star.datatransfer.dnd.XDragSourceDragActionbyteUserActionbyteDropActionbyteDropActionbyteDragSource)com.sun.star.datatransfer.dnd.XDragSourceDropActionbyteDropActionbyteautoscrollvoidacceptDragvoidrejectDragvoidrejectDropvoidacceptDropvoidUSE_CONFIGshortLEFT_valueintgetDefaultcom.sun.star.drawing.AlignmentMORE_FRONT com.sun.star.drawing.ArrangementBACK_valueintgetDefault com.sun.star.drawing.ArrangementgetDefaultcom.sun.star.drawing.BitmapModehorizontalshortFULL_valueintgetDefaultcom.sun.star.drawing.CircleKindMONO_valueintgetDefaultcom.sun.star.drawing.ColorModeLEFT_valueintAUTO_valueintgetDefault#com.sun.star.drawing.ConnectionTypeLINE_valueintgetDefault"com.sun.star.drawing.ConnectorTypeRECT_valueintgetDefaultcom.sun.star.drawing.DashStyleDirectionYdoubleDirectionZdoubleDirectionXdoubleDRAW_valueintgetDefault!com.sun.star.drawing.DrawViewModeDOWN_valueintLEFT_valueintHORIZONTAL$com.sun.star.drawing.EscapeDirectiongetDefault$com.sun.star.drawing.EscapeDirectionHATCHcom.sun.star.drawing.FillStyleNONE_valueintgetDefaultcom.sun.star.drawing.FillStyleIsRelativebooleangetDefaultcom.sun.star.drawing.HatchStyleLEFT_valueintAUTO_valueintgetDefault+com.sun.star.drawing.HorizontalDimensioninggetDefaultcom.sun.star.drawing.LayerTypeARROW_valueintNONE_valueintgetDefault com.sun.star.drawing.LineEndTypeMITER_valueintNONE_valueintgetDefaultcom.sun.star.drawing.LineJointNONE_valueintDASH_valueintgetDefaultcom.sun.star.drawing.LineStylegetDefault com.sun.star.drawing.MeasureKindAUTO_valueintgetDefault'com.sun.star.drawing.MeasureTextHorzPosBREAKEDLINE_valueintWEST_valueintEAST_valueintAUTO_valueintgetDefault'com.sun.star.drawing.MeasureTextVertPosHORIZONTALcom.sun.star.drawing.MirrorAxisgetDefaultcom.sun.star.drawing.MirrorAxisFLAT_valueintgetDefault com.sun.star.drawing.NormalsKindgetDefault!com.sun.star.drawing.PolygonFlagsLINE_valueintPOLY_valueintPLIN_valueintgetDefault com.sun.star.drawing.PolygonKindgetDefault#com.sun.star.drawing.ProjectionModeMIDDLE_TOP#com.sun.star.drawing.RectanglePointgetDefault#com.sun.star.drawing.RectanglePointFLAT_valueintgetDefaultcom.sun.star.drawing.ShadeModeHORIZONTAL#com.sun.star.drawing.SnapObjectTypegetDefault#com.sun.star.drawing.SnapObjectTypeBLOCKcom.sun.star.drawing.TextAdjustLEFT_valueintgetDefaultcom.sun.star.drawing.TextAdjustDOWN_valueintLEFT_valueintgetDefault+com.sun.star.drawing.TextAnimationDirectionSCROLL&com.sun.star.drawing.TextAnimationKindNONE_valueintgetDefault&com.sun.star.drawing.TextAnimationKindNONE_valueintRESIZEATTR&com.sun.star.drawing.TextFitToSizeTypegetDefault&com.sun.star.drawing.TextFitToSizeTypeLEFT_valueintgetDefault)com.sun.star.drawing.TextHorizontalAdjustgetDefault'com.sun.star.drawing.TextVerticalAdjustgetDefault com.sun.star.drawing.TextureKindgetDefault!com.sun.star.drawing.TextureKind2getDefault com.sun.star.drawing.TextureModegetDefault*com.sun.star.drawing.TextureProjectionModeAUTO_valueintgetDefault)com.sun.star.drawing.VerticalDimensioningcanConnectbooleanconnectEndvoidgetControlcom.sun.star.awt.XControlModelsetControlvoidsendToBackvoidenterGroupvoidleaveGroupvoidnNextStateintgetClassIDbyteisReadonlybooleansaveObjectvoidgetPosRectcom.sun.star.awt.RectangledoHandsOffvoidisHandsOffbooleangetDefault#com.sun.star.form.DataSelectionTypeParameters#com.sun.star.container.XIndexAccessPUSH_valueintgetDefault com.sun.star.form.FormButtonTypeTEXT_valueintgetDefault$com.sun.star.form.FormSubmitEncodingPOST_valueintgetDefault"com.sun.star.form.FormSubmitMethodgetDefault com.sun.star.form.ListSourceTypeNONE_valueintgetDefault#com.sun.star.form.NavigationBarModePAGE_valueintgetDefault com.sun.star.form.TabulatorCyclesetColumnsvoidgetColumns&com.sun.star.container.XIndexContainerpositionedvoidnCharacterintsSymbolSetjava.lang.String FeatureURLcom.sun.star.util.URLbIsCommentbooleanFeatureURLcom.sun.star.util.URLgetDefaultcom.sun.star.frame.FrameActionHORIZONTALshortinitializevoidgetContentcom.sun.star.ucb.XContentsetCreatorvoidgetCreator"com.sun.star.frame.XFramesSupplierdeactivatevoidinitializevoidisReadonlybooleanstoreToURLvoidstoreAsURLvoidCTL_ARABICshortCTL_HEBREWshortSHORT_YEARintLONG_MONTHintDST_OFFSETshortAbbrevNamejava.lang.String BankSymboljava.lang.String getDefault#com.sun.star.i18n.DirectionPropertyformatCodejava.lang.String formatNamejava.lang.String formatTypejava.lang.String TITLE_CASEintANY_LETTERintASC_DOLLARintUNI_LETTERintUNI_NUMBERintANY_NUMBERintUNI_NUMBERintANY_NUMBERintASC_NUMBERintbreakIndexintNUMBER_ENDshortNUMBER_INTshortFRACTION_1shortTIME_STARTshortDATE_STARTshortFRACTION_2shortStartFlagsintCandidatesjava.lang.String getDefault(com.sun.star.i18n.TransliterationModulesgetDefault+com.sun.star.i18n.TransliterationModulesNewONE_TO_ONEshortkLao_valueintkMongoliancom.sun.star.i18n.UnicodeScriptkMalayalamcom.sun.star.i18n.UnicodeScriptgetDefaultcom.sun.star.i18n.UnicodeScriptUNASSIGNEDshortWORD_COUNTshortnextScriptintgetDefault"com.sun.star.i18n.NumberFormatCodeloadModulevoidABOVE_WORDshortBELOW_WORDshortFALSE_WORDshortgetDefault$com.sun.star.installation.ProtDlgResaExceptionjava.lang.Object exportDatavoidimportDatavoidreadDoubledoublewriteHypervoidwriteFloatvoidwriteShortvoidcloseInputvoidjumpToMarkvoiddeleteMarkvoidcreateMarkintreadObjectcom.sun.star.io.XPersistObjectwriteBytesvoidterminatedvoidreadStringjava.lang.String SYSTEM_OS2shortSYSTEM_MACshortinitializevoid_listenersjava.util.Vector _firstReadbooleansetWeakRefvoidsetWeakRefvoidshowStatusvoidshowStatusvoidgetContentjava.lang.Object setWeakRefvoidgetContentjava.lang.Object checkWritevoidcheckWritevoidgetContextjava.lang.Object addWatchervoid_iProtocol2com.sun.star.lib.uno.environments.remote.IProtocol(_negotiateboolean_listenersjava.util.Vector getContextjava.lang.Object isSynchronbooleanwriteReplyvoidreadObjectjava.lang.Object _jobQueuesjava.util.Hashtable _iReceiver2com.sun.star.lib.uno.environments.remote.IReceiver(isSynchronboolean_disposeIdjava.lang.Object _doDisposejava.lang.Object _ref_countint_throwablejava.lang.Throwable getContextjava.lang.Object bInDisposebooleantrimToSizevoidgetRootOidjava.lang.String writeReplyvoid_superType-com.sun.star.lib.uno.typedesc.TypeDescription_typeClasscom.sun.star.uno.TypeClassisReadOnlybooleanCONSTintisUnsignedbooleanFROM_RIGHT,com.sun.star.linguistic2.ConversionDirectiongetDefault,com.sun.star.linguistic2.ConversionDirectiongetDefault'com.sun.star.linguistic2.DictionaryTypegetEntries)com.sun.star.linguistic2.XDictionaryEntrygetEntries)com.sun.star.linguistic2.XDictionaryEntryisNegativebooleangetMeaningjava.lang.String getLocalescom.sun.star.lang.LocaleBEST_SPEEDshortPluginNamejava.lang.String getDefault"com.sun.star.plugin.PluginVariableNONE_valueintPATH_valueintHIDE_valueintgetDefault)com.sun.star.presentation.AnimationEffectSLOW_valueintFAST_valueintgetDefault(com.sun.star.presentation.AnimationSpeedVERB_valueintNONE_valueintgetDefault%com.sun.star.presentation.ClickActionNONE_valueintgetDefault$com.sun.star.presentation.FadeEffectgetDefault+com.sun.star.presentation.PresentationRangegetDefault'com.sun.star.reflection.FieldAccessModegetDefault"com.sun.star.reflection.MethodModegetDefault!com.sun.star.reflection.ParamModegetDefault2com.sun.star.reflection.TypeDescriptionSearchDepthgetMethods"com.sun.star.reflection.XIdlMethodgetClasses!com.sun.star.reflection.XIdlClassisReadOnlybooleangetMembers7com.sun.star.reflection.XInterfaceMemberTypeDescriptiongetMembers(com.sun.star.reflection.XTypeDescriptiongetService/com.sun.star.reflection.XServiceTypeDescriptionLINK_valueintgetDefault%com.sun.star.registry.RegistryKeyTypeSTRINGLIST'com.sun.star.registry.RegistryValueTypeLONG_valueintgetDefault'com.sun.star.registry.RegistryValueTypegetKeyNamejava.lang.String createLinkbooleanisReadOnlybooleangetKeyType%com.sun.star.registry.RegistryKeyTypedeleteLinkvoidgetRootKey"com.sun.star.registry.XRegistryKeyisReadOnlybooleansetDefaultvoidgetDefaultcom.sun.star.lang.LocaleloadBundle%com.sun.star.resource.XResourceBundleScanFailedcom.sun.star.scanner.ScanErrorgetDefaultcom.sun.star.scanner.ScanErrorMethodNamejava.lang.String SourceCodejava.lang.String UNKNOWNintgetDefault com.sun.star.script.FinishReasonSourceCodejava.lang.String Step_valueintBreakPoint#com.sun.star.script.InterruptReasongetDefault#com.sun.star.script.InterruptReasongetDefaultcom.sun.star.script.MemberTypeScriptCodejava.lang.String ScriptTypejava.lang.String ScriptCodejava.lang.String ScriptTypejava.lang.String doContinuevoidisVariablebooleanisFunctionbooleanConnectioncom.sun.star.sdbc.XConnectionParameters#com.sun.star.container.XIndexAccessgetBooleanbooleanupdateNullvoidupdateTimevoidupdateDatevoidupdateBytevoidupdateLongvoidgetQueries"com.sun.star.container.XNameAccessNOT_PSEUDOintNOT_PSEUDOintDuringReadbooleanIsRequiredbooleanclearBatchvoidfindColumnintgetTypeMap"com.sun.star.container.XNameAccessgetCatalogjava.lang.String setCatalogvoidisReadOnlybooleansetTypeMapvoidgetSchemascom.sun.star.sdbc.XResultSetgetColumnscom.sun.star.sdbc.XResultSetisReadOnlybooleanacceptsURLbooleansetBooleanvoidclearBatchvoidrefreshRowvoidrowUpdatedbooleanrowDeletedbooleanisWritablebooleanisCurrencybooleanisNullableintisReadOnlybooleangetBooleanbooleanrowChangedvoidupdateBytevoidupdateNullvoidupdateDatevoidupdateTimevoidupdateLongvoidreadDoubledoublereadObjectjava.lang.Object readStringjava.lang.String writeBytesvoidwriteArrayvoidwriteShortvoidwriteFloatvoidgetColumns"com.sun.star.container.XNameAccessdeleteRowsintdropByNamevoidgetIndexes"com.sun.star.container.XNameAccessgetContext+com.sun.star.security.XAccessControlContextFONT_valueintDELETEFILEcom.sun.star.setup.ActionTypeMAKEFOLDERcom.sun.star.setup.ActionTypegetDefaultcom.sun.star.setup.ActionTypebOverwritebooleanstrDirnamejava.lang.String strPatternjava.lang.String nDriveSizeintstrCountryjava.lang.String eErrorCode$com.sun.star.setup.ResponseErrorCodeFULLDELETEcom.sun.star.setup.InstallTypegetDefaultcom.sun.star.setup.InstallTypestrDirnamejava.lang.String isSelectedbooleanUNIX_SOLSGcom.sun.star.setup.OSTypeUNIX_LINUXcom.sun.star.setup.OSTypeUNIX_SOLIGcom.sun.star.setup.OSTypegetDefaultcom.sun.star.setup.OSTypestrSectionjava.lang.String getDefault$com.sun.star.setup.ResponseErrorCodestrPatternjava.lang.String bOverwritebooleangetDefaultcom.sun.star.setup.UpdateTypebDeleteAllbooleanLEFT_valueintgetDefaultcom.sun.star.sheet.Border
COLUMNS_valueintNONE_valueintLEFT_valueintROWS_valueintgetDefault!com.sun.star.sheet.CellDeleteModeANNOTATIONint -DOWN_valueintNONE_valueintROWS_valueintgetDefault!com.sun.star.sheet.CellInsertModeNONE_valueintLESS_valueintLESS_EQUAL$com.sun.star.sheet.ConditionOperatorgetDefault$com.sun.star.sheet.ConditionOperatorNONE_valueintgetDefault!com.sun.star.sheet.DataImportMode -DATA_valueintPAGE_valueintgetDefault,com.sun.star.sheet.DataPilotFieldOrientationgetDefaultcom.sun.star.sheet.FillDateModegetDefault com.sun.star.sheet.FillDirectionSIMPLE_valueintDATE_valueintAUTO_valueintgetDefaultcom.sun.star.sheet.FillModegetDefault#com.sun.star.sheet.FilterConnectionTOP_VALUES!com.sun.star.sheet.FilterOperatorLESS_valueintLESS_EQUAL!com.sun.star.sheet.FilterOperatorgetDefault!com.sun.star.sheet.FilterOperatorIsOptionalbooleanVARP_valueintNONE_valueintAUTO_valueintgetDefault"com.sun.star.sheet.GeneralFunctionDivergencedoublePRINT_AREAintROW_HEADERint -NONE_valueintgetDefault!com.sun.star.sheet.PasteOperationNONE_valueintgetDefault com.sun.star.sheet.SheetLinkModeConnection#com.sun.star.sheet.FilterConnectionBOTH_valueintgetDefault%com.sun.star.sheet.TableOperationModeSTOP_valueintINFO_valueintgetDefault'com.sun.star.sheet.ValidationAlertStyleDATE_valueintLIST_valueintTIME_valueintgetDefault!com.sun.star.sheet.ValidationTypefillSeriesvoidsetSourcesvoidgetSources#com.sun.star.table.CellRangeAddressgetResultscom.sun.star.sheet.MemberResultgetResultscom.sun.star.sheet.DataResultgetMembers"com.sun.star.container.XNameAccessgetContentjava.lang.String setContentvoidoutputListvoidshowErrorsbooleansetLinkUrlvoidgetLinkUrljava.lang.String hideDetailvoidshowDetailvoidmoveByNamevoidcopyByNamevoidPRINT_AREAintROW_HEADERintNONE_valueintPAGE_AFTERcom.sun.star.style.BreakTypegetDefaultcom.sun.star.style.BreakTypeMIDDLE_TOP"com.sun.star.style.GraphicLocationNONE_valueintAREA_valueintgetDefault"com.sun.star.style.GraphicLocationLEFT_valueintgetDefault&com.sun.star.style.HorizontalAlignmentCHARS_THAIshortLEFT_valueintgetDefault"com.sun.star.style.PageStyleLayoutBLOCK"com.sun.star.style.ParagraphAdjustLEFT_valueintgetDefault"com.sun.star.style.ParagraphAdjustDEFAULTcom.sun.star.style.TabAlignLEFT_valueintgetDefaultcom.sun.star.style.TabAligngetDefault$com.sun.star.style.VerticalAlignmentGenerationintSyncFilterjava.lang.String VFS_FOLDERintinitializebooleanPosixErrorintgetSubjectjava.lang.String setSubjectvoidTEXT_valueintgetDefault"com.sun.star.table.CellContentTypeLEFT_valueintgetDefault"com.sun.star.table.CellHoriJustifygetDefault"com.sun.star.table.CellOrientationgetDefault"com.sun.star.table.CellVertJustifyBOTTOM_RIGHT_valueintNONE_valueintgetDefault!com.sun.star.table.ShadowLocationBottomLinecom.sun.star.table.BorderLineROWS_valueintgetDefault#com.sun.star.table.TableOrientationgetDefault%com.sun.star.table.TableSortFieldTypeautoFormatvoidsetFormulavoidgetFormulajava.lang.String gotoOffsetvoidgetColumns com.sun.star.table.XTableColumnsINFO_valueintgetDefault+com.sun.star.task.InteractionClassificationgetDefault%com.sun.star.task.PasswordRequestModegetRequestjava.lang.Object LOLA_valueintTEST_valueintgetDefault!com.sun.star.test.bridge.TestEnumsetValues2)com.sun.star.test.bridge.TestDataElementscallOnewayvoidcomplex_in*com.sun.star.test.performance.ComplexTypestestPassedbooleanFIRST_NAMEshortIDENTIFIERshortTECHREPORTshortCONFERENCEshortHARD_SPACEshortLINE_BREAKshortDDMMMMYYYYshortDISK_ABOVEshortDISK_BELOWshortLEFT_valueintgetDefault"com.sun.star.text.HorizontalAdjustONLY_valueintgetDefaultcom.sun.star.text.NotePrintModePREV_valueintNEXT_valueintgetDefault com.sun.star.text.PageNumberTypePRINT_AREAshortFRAME_LEFTshortPAGE_RIGHTshortPAGE_FRAMEshortBLOCKcom.sun.star.text.RubyAdjustLEFT_valueintgetDefaultcom.sun.star.text.RubyAdjustFilterNamejava.lang.String LeftMarginintAT_PARAGRAPH'com.sun.star.text.TextContentAnchorTypegetDefault'com.sun.star.text.TextContentAnchorTypeHHMMSSAMPMshortCHAR_TOPshortNONE_valueintLEFT_valueintgetDefaultcom.sun.star.text.WrapTextModegetDefaultcom.sun.star.text.WritingModejumpToPagebooleanprintPagesvoidsetColumnsvoidgetColumnscom.sun.star.text.TextColumninitializevoidgetColumns com.sun.star.table.XTableColumnsmergeRangebooleansplitRangebooleansetVisiblevoidServerNamejava.lang.String HasAccountbooleanDiagnosticjava.lang.String getDefault%com.sun.star.ucb.ContentCreationErrorPropertiescom.sun.star.beans.PropertyAttributesintgetDefaultcom.sun.star.ucb.CookiePolicySEND_valueintgetDefaultcom.sun.star.ucb.CookieRequestgetDefault"com.sun.star.ucb.DocumentStoreModeNO_DOCINFOintFetchErrorshortStartIndexintgetDefault"com.sun.star.ucb.FolderListCommandSubscribedbooleanCANT_WRITEcom.sun.star.ucb.IOErrorCodegetDefaultcom.sun.star.ucb.IOErrorCodeDiagnosticjava.lang.String Diagnosticjava.lang.String ActionInfojava.lang.Object LockTokensjava.lang.String ZERO_valueintgetDefaultcom.sun.star.ucb.LockDepthgetDefaultcom.sun.star.ucb.LockScopegetDefaultcom.sun.star.ucb.LockTypePropertiesjava.lang.String Propertiescom.sun.star.beans.PropertygetDefault%com.sun.star.ucb.OutgoingMessageStateLOWEST_valueintHIGH_valueintgetDefaultcom.sun.star.ucb.PriorityValueState#com.sun.star.ucb.PropertyValueStategetDefault#com.sun.star.ucb.PropertyValueStateNewsgroupsjava.lang.String PERSISTENT'com.sun.star.ucb.RememberAuthenticationgetDefault'com.sun.star.ucb.RememberAuthenticationgetDefault2com.sun.star.ucb.RemoteContentProviderChangeActionIdentifierjava.lang.String MARKUNREADshortVALUE_TRUEshortPropertiescom.sun.star.beans.PropertyDEEP_valueintNONE_valueintgetDefault com.sun.star.ucb.SearchRecursiongetDefault"com.sun.star.ucb.SynchronizePolicyMOVE_valueintLINK_valueintCOPY_valueintgetDefault)com.sun.star.ucb.TransferCommandOperationONCE_valueintgetDefault!com.sun.star.ucb.VerificationModemapContentcom.sun.star.ucb.XContentgetDataURLjava.lang.String setDataURLvoidsetAccountvoidisReadOnlybooleanGET_SELECTED_ITEM_INDEXshortgetDefault,com.sun.star.ui.ContextMenuInterceptorActiongetContextjava.lang.Object isUnsignedboolean_typeClasscom.sun.star.uno.TypeClassCHAR_valueintBYTE_valueintTYPE_valueintVOID_valueintLONG_valueintENUM_valueintgetDefaultcom.sun.star.uno.TypeClassgetMappingcom.sun.star.uno.IMappinggetBridgescom.sun.star.uno.IBridgeisLoggablebooleanisLoggablebooleanDONE_valueintgetDefault%com.sun.star.util.DataEditorEventTypeEndMinutesshortStartHoursshortEndSecondsshortStartMonthshortINCH_100THshortSCIENTIFICshortgetDefault"com.sun.star.util.SearchAlgorithmssearchStringjava.lang.String searchFlagintgetDefaultcom.sun.star.util.SortFieldTypegetContent#com.sun.star.container.XIndexAccessgetClasses!com.sun.star.util.AtomDescriptionisModifiedbooleanreplaceAllintmapStringsbooleansetOptionsvoidparseSmartbooleanPAGE_WIDTHshortUSER_valueintgetDefaultcom.sun.star.view.PaperFormatgetDefault"com.sun.star.view.PaperOrientationJOB_FAILED com.sun.star.view.PrintableStategetDefault com.sun.star.view.PrintableStategetControlcom.sun.star.awt.XControlgetPrinter com.sun.star.beans.PropertyValuesetPrintervoidgetPrinter com.sun.star.beans.PropertyValuescreenDownbooleanendElementvoidcharactersvoidLineNumberintcharactersvoidendElementvoidfatalErrorvoidstartCDATAvoidgetDesktopcom.sun.star.frame.XDesktop
\ No newline at end of file diff --git a/scripting/java/org/openoffice/netbeans/editor/OOo.jcs b/scripting/java/org/openoffice/netbeans/editor/OOo.jcs deleted file mode 100644 index c5cc334221ba..000000000000 --- a/scripting/java/org/openoffice/netbeans/editor/OOo.jcs +++ /dev/null @@ -1,21 +0,0 @@ -!com.sun.star.awt.XProgressMonitor44com.sun.star.awt.XRadioButtonhKcom.sun.star.awt.XRegioncom.sun.star.awt.XScrollBargcom.sun.star.awt.XSpinFieldQcom.sun.star.awt.XSpinListenerC+$com.sun.star.awt.XSystemChildFactoryn+com.sun.star.awt.XSystemDependentWindowPeer4com.sun.star.awt.XTabController$com.sun.star.awt.XTabControllerModel.com.sun.star.awt.XTextAreacom.sun.star.awt.XTextComponentcom.sun.star.awt.XTextEditField&com.sun.star.awt.XTextLayoutConstrainsˎcom.sun.star.awt.XTextListenerhcom.sun.star.awt.XTimeFieldcom.sun.star.awt.XToolkitKcom.sun.star.awt.XTopWindowY#com.sun.star.awt.XTopWindowListenerr%com.sun.star.awt.XUnoControlContainerԈh'com.sun.star.awt.XUserInputInterceptionucom.sun.star.awt.XVclContainere5&com.sun.star.awt.XVclContainerListenerؚ"com.sun.star.awt.XVclContainerPeerوcom.sun.star.awt.XVclWindowPeerڢ5com.sun.star.awt.XViewׁ<com.sun.star.awt.XWindowS com.sun.star.awt.XWindowListenerfUcom.sun.star.awt.XWindowPeer㻁O'com.sun.star.beans.IllegalTypeException -i)com.sun.star.beans.IntrospectionExceptionsi com.sun.star.beans.MethodConcept܀com.sun.star.beans.NamedValuet)com.sun.star.beans.NotRemoveableException'icom.sun.star.beans.Property琀$com.sun.star.beans.PropertyAttribute耀&com.sun.star.beans.PropertyChangeEventdN"com.sun.star.beans.PropertyConceptl)com.sun.star.beans.PropertyExistExceptioni(com.sun.star.beans.PropertySetInfoChangeJ-com.sun.star.beans.PropertySetInfoChangeEventр com.sun.star.beans.PropertyState좁s+com.sun.star.beans.PropertyStateChangeEvento com.sun.star.beans.PropertyValue(com.sun.star.beans.PropertyVetoExceptionicom.sun.star.beans.StringPair+com.sun.star.beans.UnknownPropertyExceptionicom.sun.star.beans.XExactName##com.sun.star.beans.XFastPropertySetǁ+com.sun.star.beans.XHierarchicalPropertySet/com.sun.star.beans.XHierarchicalPropertySetInfo1.com.sun.star.beans.XIntroTest_!com.sun.star.beans.XIntrospection'com.sun.star.beans.XIntrospectionAccess "com.sun.star.beans.XMaterialHolderʀ0com.sun.star.beans.XMultiHierarchicalPropertySetY3$com.sun.star.beans.XMultiPropertySet'com.sun.star.beans.XMultiPropertyStatesj,com.sun.star.beans.XPropertiesChangeListener q,com.sun.star.beans.XPropertiesChangeNotifier -(Fcom.sun.star.beans.XPropertyn"com.sun.star.beans.XPropertyAccess -*com.sun.star.beans.XPropertyChangeListener
%com.sun.star.beans.XPropertyContainerScom.sun.star.beans.XPropertySet1#com.sun.star.beans.XPropertySetInfo?G1com.sun.star.beans.XPropertySetInfoChangeListener1com.sun.star.beans.XPropertySetInfoChangeNotifierI2!com.sun.star.beans.XPropertyState{X/com.sun.star.beans.XPropertyStateChangeListenerӀ%com.sun.star.beans.XPropertyWithStateJ*com.sun.star.beans.XVetoableChangeListener܀)com.sun.star.bridge.BridgeExistsExceptioni2com.sun.star.bridge.InvalidProtocolChangeException$"com.sun.star.bridge.ModelDependent;R$com.sun.star.bridge.ProtocolPropertycom.sun.star.bridge.XBridge @"com.sun.star.bridge.XBridgeFactory!*#com.sun.star.bridge.XBridgeSupplier#$com.sun.star.bridge.XBridgeSupplier2$%com.sun.star.bridge.XInstanceProvider$'com.sun.star.bridge.XProtocolProperties%ȁ:#com.sun.star.bridge.XUnoUrlResolver'),com.sun.star.chart.ChartAxisArrangeOrderType(+"com.sun.star.chart.ChartAxisAssign*=!com.sun.star.chart.ChartAxisMarks*V@#com.sun.star.chart.ChartDataCaption*m'com.sun.star.chart.ChartDataChangeEvent+C&com.sun.star.chart.ChartDataChangeType,Ftcom.sun.star.chart.ChartDataRow.%com.sun.star.chart.ChartDataRowSource/Ɂ!com.sun.star.chart.ChartDataValue0ီ%com.sun.star.chart.ChartErrorCategory1h*com.sun.star.chart.ChartErrorIndicatorType3&com.sun.star.chart.ChartLegendPosition5Á+com.sun.star.chart.ChartRegressionCurveType7t%com.sun.star.chart.ChartSeriesAddress::!com.sun.star.chart.ChartSolidType;T_"com.sun.star.chart.ChartSymbolType;com.sun.star.chart.X3DDisplay<v!com.sun.star.chart.XAxisXSupplier=@4!com.sun.star.chart.XAxisYSupplier>t4!com.sun.star.chart.XAxisZSupplier?4com.sun.star.chart.XChartData@܁p"com.sun.star.chart.XChartDataArrayBLc0com.sun.star.chart.XChartDataChangeEventListenerC!com.sun.star.chart.XChartDocumentDgcom.sun.star.chart.XDiagramFP{$com.sun.star.chart.XStatisticDisplayGˁ$com.sun.star.chart.XTwoAxisXSupplierH̀$com.sun.star.chart.XTwoAxisYSupplierIw-com.sun.star.comp.bridgefactory.BridgeFactoryJ!3&com.sun.star.comp.connections.AcceptorMTo'com.sun.star.comp.connections.ConnectorOÂ%6com.sun.star.comp.connections.ConstantInstanceProviderQ肿-com.sun.star.comp.connections.PipedConnectionT"com.sun.star.comp.helper.BootstrapXU)com.sun.star.comp.helper.ComponentContextZ9.com.sun.star.comp.helper.ComponentContextEntry[䀘/com.sun.star.comp.helper.RegistryServiceFactory\|9,com.sun.star.comp.helper.SharedLibraryLoader^ .com.sun.star.comp.loader.FactoryHelper.Factorya&com.sun.star.comp.loader.FactoryHelpergE#com.sun.star.comp.loader.JavaLoaderi*com.sun.star.comp.loader.JavaLoaderFactoryn肰0com.sun.star.comp.loader.RegistrationClassFinderq /com.sun.star.comp.servicemanager.ServiceManager s?com.sun.star.comp.typedescriptionmanager.TypeDescriptionManager(}Q96com.sun.star.comp.urlresolver.UrlResolver._UrlResolver ~J)com.sun.star.comp.urlresolver.UrlResolverԁ@com.sun.star.configuration.backend.AuthenticationFailedException"䀛9com.sun.star.configuration.backend.BackendAccessException"8com.sun.star.configuration.backend.BackendSetupException" -9com.sun.star.configuration.backend.CannotConnectException":com.sun.star.configuration.backend.ConnectionLostException"Dcom.sun.star.configuration.backend.InsufficientAccessRightsException"<Jcom.sun.star.configuration.backend.InvalidAuthenticationMechanismException"9com.sun.star.configuration.backend.MalformedDataException"s0com.sun.star.configuration.backend.NodeAttribute"Ia2com.sun.star.configuration.backend.SchemaAttribute"b5com.sun.star.configuration.backend.TemplateIdentifier"+com.sun.star.configuration.backend.XBackend"Ã3com.sun.star.configuration.backend.XBackendEntities"2com.sun.star.configuration.backend.XCompositeLayer"r)com.sun.star.configuration.backend.XLayer"[A0com.sun.star.configuration.backend.XLayerHandler"1com.sun.star.configuration.backend.XLayerImporter" <5com.sun.star.configuration.backend.XMultiLayerStratum"\O*com.sun.star.configuration.backend.XSchema"1com.sun.star.configuration.backend.XSchemaHandler"2com.sun.star.configuration.backend.XSchemaSupplier"+6com.sun.star.configuration.backend.XSingleLayerStratum"!2com.sun.star.configuration.backend.XUpdatableLayer"K1com.sun.star.configuration.backend.XUpdateHandler"V=;com.sun.star.configuration.CannotLoadConfigurationExceptioni:com.sun.star.configuration.InstallationIncompleteException8com.sun.star.configuration.InvalidBootstrapFileException8com.sun.star.configuration.MissingBootstrapFileException-com.sun.star.configuration.XTemplateContainer|,com.sun.star.configuration.XTemplateInstance1com.sun.star.connection.AlreadyAcceptingException©i0com.sun.star.connection.ConnectionSetupExceptioni*com.sun.star.connection.NoConnectException{i(com.sun.star.connection.SocketPermission䀵!com.sun.star.connection.XAcceptorę\#com.sun.star.connection.XConnectionc$com.sun.star.connection.XConnection2X.com.sun.star.connection.XConnectionBroadcasterB"com.sun.star.connection.XConnector2%com.sun.star.container.ContainerEventB,com.sun.star.container.ElementExistExceptionUi-com.sun.star.container.NoSuchElementException˾icom.sun.star.container.XChild',com.sun.star.container.XComponentEnumeration2com.sun.star.container.XComponentEnumerationAccess!com.sun.star.container.XContainerΠ -)com.sun.star.container.XContainerListenerϪ>&com.sun.star.container.XContainerQuery90com.sun.star.container.XContentEnumerationAccess!%com.sun.star.container.XElementAccess#com.sun.star.container.XEnumerationǁ)com.sun.star.container.XEnumerationAccess(com.sun.star.container.XHierarchicalNameՀ-.com.sun.star.container.XHierarchicalNameAccess֭1com.sun.star.container.XHierarchicalNameContainer/com.sun.star.container.XHierarchicalNameReplace٤Q(com.sun.star.container.XIdentifierAccess+com.sun.star.container.XIdentifierContainert)com.sun.star.container.XIdentifierReplace݀7(com.sun.star.container.XImplicitIDAccess+com.sun.star.container.XImplicitIDContainer߾)com.sun.star.container.XImplicitIDReplace׀#com.sun.star.container.XIndexAccess᷁ -&com.sun.star.container.XIndexContainer$com.sun.star.container.XIndexReplacee,"com.sun.star.container.XNameAccess呁Y%com.sun.star.container.XNameContainerꁾ#com.sun.star.container.XNameReplace訁9com.sun.star.container.XNamedဳcom.sun.star.container.XSetꔁ&com.sun.star.container.XUniqueIDAccess74+com.sun.star.corba.giop.CancelRequestHeaderkp*com.sun.star.corba.giop.FragmentHeader_1_2p)com.sun.star.corba.giop.IORAddressingInfoK-com.sun.star.corba.giop.LocateReplyHeader_1_2/com.sun.star.corba.giop.LocateRequestHeader_1_0瀬,com.sun.star.corba.giop.LocateStatusType_1_2)com.sun.star.corba.giop.MessageHeader_1_0j)com.sun.star.corba.giop.MessageHeader_1_1_#com.sun.star.corba.giop.MsgType_1_1L'com.sun.star.corba.giop.ReplyHeader_1_2>+com.sun.star.corba.giop.ReplyStatusType_1_2Â)com.sun.star.corba.giop.RequestHeader_1_0)com.sun.star.corba.giop.RequestHeader_1_1Ăs)com.sun.star.corba.giop.RequestHeader_1_2780com.sun.star.corba.giop.SystemExceptionReplyBodyo%com.sun.star.corba.giop.TargetAddressZ*com.sun.star.corba.giop.TargetAddressGroupWcom.sun.star.corba.giop.Version1/com.sun.star.corba.iiop.BiDirIIOPServiceContext#com.sun.star.corba.iiop.ListenPoint'com.sun.star.corba.iiop.ProfileBody_1_0 dJ'com.sun.star.corba.iiop.ProfileBody_1_1 -com.sun.star.corba.iiop.Versioncom.sun.star.corba.iop.IOR
=%com.sun.star.corba.iop.ProfileIdGroup[%com.sun.star.corba.iop.ServiceContext‰%com.sun.star.corba.iop.ServiceIdGroupI&com.sun.star.corba.iop.TaggedComponentۀ$com.sun.star.corba.iop.TaggedProfilecom.sun.star.corba.CorbaString81com.sun.star.corba.CorbaUnionk"com.sun.star.corba.LogicalThreadID%com.sun.star.corba.ObjectKeycom.sun.star.corba.OneThreadID怦com.sun.star.corba.TCKind2com.sun.star.datatransfer.clipboard.ClipboardEvent#V9com.sun.star.datatransfer.clipboard.RenderingCapabilities#-<.com.sun.star.datatransfer.clipboard.XClipboard#i@0com.sun.star.datatransfer.clipboard.XClipboardEx# 5com.sun.star.datatransfer.clipboard.XClipboardFactory#!L6com.sun.star.datatransfer.clipboard.XClipboardListener#"=5com.sun.star.datatransfer.clipboard.XClipboardManager#"6com.sun.star.datatransfer.clipboard.XClipboardNotifier#$$3com.sun.star.datatransfer.clipboard.XClipboardOwner#&7com.sun.star.datatransfer.clipboard.XFlushableClipboard#&*com.sun.star.datatransfer.dnd.DNDConstants'|.com.sun.star.datatransfer.dnd.DragGestureEvent(6^1com.sun.star.datatransfer.dnd.DragSourceDragEvent) 1com.sun.star.datatransfer.dnd.DragSourceDropEvent*'-com.sun.star.datatransfer.dnd.DragSourceEvent+ہX6com.sun.star.datatransfer.dnd.DropTargetDragEnterEvent-31com.sun.star.datatransfer.dnd.DropTargetDragEvent.́u1com.sun.star.datatransfer.dnd.DropTargetDropEvent0A-com.sun.star.datatransfer.dnd.DropTargetEvent2:com.sun.star.datatransfer.dnd.InvalidDNDOperationException2p)com.sun.star.datatransfer.dnd.XAutoscroll32com.sun.star.datatransfer.dnd.XDragGestureListener3Ԁ4com.sun.star.datatransfer.dnd.XDragGestureRecognizer4<)com.sun.star.datatransfer.dnd.XDragSource5ԁ0com.sun.star.datatransfer.dnd.XDragSourceContext7q1com.sun.star.datatransfer.dnd.XDragSourceListener8Y)com.sun.star.datatransfer.dnd.XDropTarget:D4com.sun.star.datatransfer.dnd.XDropTargetDragContext;݀4com.sun.star.datatransfer.dnd.XDropTargetDropContext<~1com.sun.star.datatransfer.dnd.XDropTargetListener=C$com.sun.star.datatransfer.DataFlavor?,4com.sun.star.datatransfer.UnsupportedFlavorException@.i/com.sun.star.datatransfer.XDataFormatTranslator@+*com.sun.star.datatransfer.XMimeContentTypeA1com.sun.star.datatransfer.XMimeContentTypeFactoryCf-com.sun.star.datatransfer.XSystemTransferableDY-com.sun.star.datatransfer.XTransferDataAccessD'com.sun.star.datatransfer.XTransferableEၞ)com.sun.star.datatransfer.XTransferableExG-com.sun.star.datatransfer.XTransferableSourceHW+com.sun.star.document.AmbigousFilterRequestH=*com.sun.star.document.BrokenPackageRequestJ0!com.sun.star.document.EventObjectJ*com.sun.star.document.FilterOptionsRequestKt%com.sun.star.document.LinkUpdateModesMX#com.sun.star.document.MacroExecModeMu)com.sun.star.document.NoSuchFilterRequestNZ.com.sun.star.document.PrinterIndependentLayoutO'o(com.sun.star.document.RedlineDisplayTypeOj#com.sun.star.document.UpdateDocModeP'com.sun.star.drawing.MeasureTextHorzPos6'com.sun.star.drawing.MeasureTextVertPoscom.sun.star.drawing.MirrorAxis com.sun.star.drawing.NormalsKindG,com.sun.star.drawing.PolyPolygonBezierCoordsKS'com.sun.star.drawing.PolyPolygonShape3D!com.sun.star.drawing.PolygonFlags com.sun.star.drawing.PolygonKindJcom.sun.star.drawing.Position3D##com.sun.star.drawing.ProjectionModeց #com.sun.star.drawing.RectanglePointHcom.sun.star.drawing.ShadeMode>t#com.sun.star.drawing.SnapObjectType`com.sun.star.drawing.TextAdjust+com.sun.star.drawing.TextAnimationDirection&com.sun.star.drawing.TextAnimationKind&com.sun.star.drawing.TextFitToSizeTypew)com.sun.star.drawing.TextHorizontalAdjust7'com.sun.star.drawing.TextVerticalAdjust큪 com.sun.star.drawing.TextureKind -!com.sun.star.drawing.TextureKind2V com.sun.star.drawing.TextureModeK*com.sun.star.drawing.TextureProjectionModeB)com.sun.star.drawing.VerticalDimensioningρ&com.sun.star.drawing.XConnectableShape$com.sun.star.drawing.XConnectorShape}"com.sun.star.drawing.XControlShapeDcom.sun.star.drawing.XDrawPagel(com.sun.star.drawing.XDrawPageDuplicator&com.sun.star.drawing.XDrawPageExpanderB(com.sun.star.drawing.XDrawPageSummarizer&com.sun.star.drawing.XDrawPageSuppliercom.sun.star.drawing.XDrawPagesX'com.sun.star.drawing.XDrawPagesSupplier>com.sun.star.drawing.XDrawView݀(com.sun.star.drawing.XGluePointsSupplierúcom.sun.star.drawing.XLayerao"com.sun.star.drawing.XLayerManagerЁ#com.sun.star.drawing.XLayerSupplierƏ&com.sun.star.drawing.XMasterPageTarget4)com.sun.star.drawing.XMasterPagesSuppliercom.sun.star.drawing.XShapeȰM"com.sun.star.drawing.XShapeAligner#com.sun.star.drawing.XShapeArranger0!com.sun.star.drawing.XShapeBinder#com.sun.star.drawing.XShapeCombiner׀%com.sun.star.drawing.XShapeDescriptorξ com.sun.star.drawing.XShapeGroupN"com.sun.star.drawing.XShapeGrouper!com.sun.star.drawing.XShapeMirrorcom.sun.star.drawing.XShapes.com.sun.star.drawing.XUniversalShapeDescriptorŀcom.sun.star.embed.Aspectsgcom.sun.star.embed.BorderWidthscom.sun.star.embed.ElementModesŀcom.sun.star.embed.EmbedMiscՉcom.sun.star.embed.EmbedStates#com.sun.star.embed.EmbedUpdateModesQcom.sun.star.embed.EmbedVerbs]!com.sun.star.embed.EntryInitModes7*com.sun.star.embed.InvalidStorageExceptioni%com.sun.star.embed.StorageWTExceptionD,com.sun.star.embed.UnreachableStateExceptionπ&com.sun.star.embed.WrongStateExceptionܢi$com.sun.star.embed.XClassifiedObject%com.sun.star.embed.XComponentSupplier
&com.sun.star.embed.XEmbedObjectFactoryީ com.sun.star.embed.XEmbedPersist⌅"com.sun.star.embed.XEmbeddedClientE"com.sun.star.embed.XEmbeddedObject1-com.sun.star.embed.XEncryptionProtectedSource8)com.sun.star.embed.XIPMainContainerWindowȁ+!com.sun.star.embed.XInplaceClientU!com.sun.star.embed.XInplaceObjectH#com.sun.star.embed.XInplaceUIWindoŵ"com.sun.star.embed.XLinkageSupport́%com.sun.star.embed.XPersistanceHolderۀcom.sun.star.embed.XStorageE$com.sun.star.embed.XTransactedObject'com.sun.star.embed.XTransactionListener)(com.sun.star.embed.XTransferableSupplier com.sun.star.embed.XVisualObject -U7"com.sun.star.embed.XWindowSupplier#com.sun.star.form.DataSelectionType
!%com.sun.star.form.DatabaseDeleteEvent(com.sun.star.form.DatabaseParameterEventcom.sun.star.form.ErrorEventg com.sun.star.form.FormButtonType|#com.sun.star.form.FormComponentType$com.sun.star.form.FormSubmitEncoding3W"com.sun.star.form.FormSubmitMethod com.sun.star.form.ListSourceType #com.sun.star.form.NavigationBarModeT com.sun.star.form.TabulatorCycleG+com.sun.star.form.XApproveActionBroadcasterI(com.sun.star.form.XApproveActionListenerY!com.sun.star.form.XBoundComponentcom.sun.star.form.XBoundControl$com.sun.star.form.XChangeBroadcaster2!com.sun.star.form.XChangeListener&+com.sun.star.form.XConfirmDeleteBroadcasterˁ(com.sun.star.form.XConfirmDeleteListener ۀ/com.sun.star.form.XDatabaseParameterBroadcaster!,com.sun.star.form.XDatabaseParameterListener"!com.sun.star.form.XDeleteListener#W#com.sun.star.form.XErrorBroadcaster$: com.sun.star.form.XErrorListener%*com.sun.star.form.XForm%p com.sun.star.form.XFormComponent&Cm!com.sun.star.form.XFormController&?)com.sun.star.form.XFormControllerListener' com.sun.star.form.XFormsSupplier(׀com.sun.star.form.XGrid)x$com.sun.star.form.XGridColumnFactory*7(com.sun.star.form.XGridFieldDataSupplier+=com.sun.star.form.XGridPeer,*(com.sun.star.form.XImageProducerSupplier-!com.sun.star.form.XInsertListener-com.sun.star.form.XLoadListener.~com.sun.star.form.XLoadable0
;&com.sun.star.form.XPositioningListener1Hcom.sun.star.form.XReset1 com.sun.star.form.XResetListener2"com.sun.star.form.XRestoreListener3Հcom.sun.star.form.XSubmit4{C!com.sun.star.form.XSubmitListener5$com.sun.star.form.XUpdateBroadcaster6l!com.sun.star.form.XUpdateListener7`%com.sun.star.formula.SymbolDescriptor8C%com.sun.star.frame.DispatchDescriptor:&com.sun.star.frame.DispatchResultEvent:&com.sun.star.frame.DispatchResultState;N$com.sun.star.frame.DispatchStatement;w0com.sun.star.frame.DoubleInitializationException=li$com.sun.star.frame.FeatureStateEvent=Ձ_com.sun.star.frame.FrameAction?48#com.sun.star.frame.FrameActionEventBl"com.sun.star.frame.FrameSearchFlagCp-com.sun.star.frame.IllegalArgumentIOExceptionD -j+com.sun.star.frame.TerminationVetoExceptionDti com.sun.star.frame.WindowArrangeD݀)com.sun.star.frame.XBrowseHistoryRegistryEc#com.sun.star.frame.XComponentLoaderFd@%com.sun.star.frame.XComponentRegistryG!com.sun.star.frame.XConfigManagerH`com.sun.star.frame.XControllerIcom.sun.star.frame.XDesktopKcom.sun.star.frame.XDesktopTaskMVcom.sun.star.frame.XDispatchN -z"com.sun.star.frame.XDispatchHelperO$com.sun.star.frame.XDispatchProviderP.0com.sun.star.frame.XDispatchProviderInterceptionQ0/com.sun.star.frame.XDispatchProviderInterceptorR$com.sun.star.frame.XDispatchRecorderT,com.sun.star.frame.XDispatchRecorderSupplierV(n*com.sun.star.frame.XDispatchResultListenerW%com.sun.star.frame.XDocumentTemplatesXM+com.sun.star.frame.XExtendedFilterDetectionZ com.sun.star.frame.XFilterDetect[com.sun.star.frame.XFrame\'com.sun.star.frame.XFrameActionListener`3com.sun.star.frame.XFrameLoader`
$com.sun.star.frame.XFrameLoaderQueryaH!com.sun.star.frame.XFrameSetModelc7com.sun.star.frame.XFramesc"com.sun.star.frame.XFramesSupplierd#com.sun.star.frame.XInterceptorInfoe%com.sun.star.frame.XLoadEventListenerfcom.sun.star.frame.XLoadablegqcom.sun.star.frame.XModelh%com.sun.star.frame.XNotifyingDispatchkƀ&com.sun.star.frame.XRecordableDispatchl"com.sun.star.frame.XStatusListenermcom.sun.star.frame.XStorablenb'com.sun.star.frame.XSynchronousDispatchp-*com.sun.star.frame.XSynchronousFrameLoaderqcom.sun.star.frame.XTaskq!com.sun.star.frame.XTasksSupplierr%com.sun.star.frame.XTerminateListenerscom.sun.star.frame.XUrlListt"com.sun.star.frame.XWindowArrangeruVcom.sun.star.i18n.AmPmValuev1com.sun.star.i18n.Boundaryv9com.sun.star.i18n.BreakTypevacom.sun.star.i18n.CTLScriptTypew~com.sun.star.i18n.Calendarw%com.sun.star.i18n.CalendarDisplayCodez%g&com.sun.star.i18n.CalendarDisplayIndex{b$com.sun.star.i18n.CalendarFieldIndex{Ncom.sun.star.i18n.CalendarItem}<com.sun.star.i18n.CharType~$3'com.sun.star.i18n.CharacterIteratorModeWa!com.sun.star.i18n.CollatorOptionscom.sun.star.i18n.CurrencyB#com.sun.star.i18n.DirectionPropertyɇ%com.sun.star.i18n.ForbiddenCharactersKcom.sun.star.i18n.FormatElement com.sun.star.i18n.Implementation(com.sun.star.i18n.InputSequenceCheckModeEN com.sun.star.i18n.KCharacterType#com.sun.star.i18n.KNumberFormatType8G$com.sun.star.i18n.KNumberFormatUsagecom.sun.star.i18n.KParseTokensAcom.sun.star.i18n.KParseType%com.sun.star.i18n.LanguageCountryInfoc-com.sun.star.i18n.LineBreakHyphenationOptionsMp"com.sun.star.i18n.LineBreakResults&com.sun.star.i18n.LineBreakUserOptionse com.sun.star.i18n.LocaleDataItem`com.sun.star.i18n.LocaleItemxcom.sun.star.i18n.Months.com.sun.star.i18n.MultipleCharsOutputException|i"com.sun.star.i18n.NativeNumberMode+com.sun.star.i18n.NativeNumberXmlAttributesր"com.sun.star.i18n.NumberFormatCodeˁR#com.sun.star.i18n.NumberFormatIndexcom.sun.star.i18n.ParseResultӁI!com.sun.star.i18n.ScriptDirectionYcom.sun.star.i18n.ScriptTypeuX&com.sun.star.i18n.TextConversionOptiong&com.sun.star.i18n.TextConversionResult4$com.sun.star.i18n.TextConversionType0j(com.sun.star.i18n.TransliterationModules+com.sun.star.i18n.TransliterationModulesNew%com.sun.star.i18n.TransliterationTypePcom.sun.star.i18n.UnicodeScriptݛcom.sun.star.i18n.UnicodeType5com.sun.star.i18n.Weekdayscom.sun.star.i18n.WordType} com.sun.star.i18n.XBreakIteratorcom.sun.star.i18n.XCalendar&com.sun.star.lang.NoSuchFieldExceptionVi'com.sun.star.lang.NoSuchMethodExceptionW]i$com.sun.star.lang.NoSupportExceptionWi&com.sun.star.lang.NullPointerExceptionX/i/com.sun.star.lang.ServiceNotRegisteredExceptionXi!com.sun.star.lang.SystemDependentY(com.sun.star.lang.WrappedTargetExceptionY/com.sun.star.lang.WrappedTargetRuntimeExceptionZxcom.sun.star.lang.XComponent[X"com.sun.star.lang.XConnectionPoint\\+com.sun.star.lang.XConnectionPointContainer^z com.sun.star.lang.XEventListener_!com.sun.star.lang.XInitialization`.com.sun.star.lang.XLocalizable`com.sun.star.lang.XMaina(com.sun.star.lang.XMultiComponentFactoryb5&com.sun.star.lang.XMultiServiceFactorydk%com.sun.star.lang.XServiceDisplayNameelcom.sun.star.lang.XServiceInfof!com.sun.star.lang.XServiceNameg)com.sun.star.lang.XSingleComponentFactorygs'com.sun.star.lang.XSingleServiceFactoryi#com.sun.star.lang.XTypeProviderj5com.sun.star.lang.XUnoTunnelj怌)com.sun.star.ldap.LdapConnectionExceptionkri&com.sun.star.ldap.LdapGenericExceptionkۀ0com.sun.star.lib.connections.pipe.PipeConnection!l.com.sun.star.lib.connections.pipe.pipeAcceptor!pE/com.sun.star.lib.connections.pipe.pipeConnector!ra4com.sun.star.lib.connections.socket.SocketConnection#t\2com.sun.star.lib.connections.socket.socketAcceptor#xFE3com.sun.star.lib.connections.socket.socketConnector#z!com.sun.star.lib.sandbox.Cachable|x%com.sun.star.lib.sandbox.ClassContext|*com.sun.star.lib.sandbox.ClassContextProxy #com.sun.star.lib.sandbox.CodeSourceY#com.sun.star.lib.sandbox.DisposableA+)com.sun.star.lib.sandbox.ExecutionContextlcom.sun.star.lib.sandbox.Holderl!com.sun.star.lib.sandbox.JarEntry-com.sun.star.lib.sandbox.PermissionCollection)com.sun.star.lib.sandbox.ProtectionDomain{!com.sun.star.lib.sandbox.Resource1&com.sun.star.lib.sandbox.ResourceProxyM'com.sun.star.lib.sandbox.ResourceViewer.(com.sun.star.lib.sandbox.SandboxSecurity1com.sun.star.lib.sandbox.SandboxSecurityException+com.sun.star.lib.sandbox.SandboxThreadGroup[ com.sun.star.lib.sandbox.WeakRef1"com.sun.star.lib.sandbox.WeakTabletcom.sun.star.lib.sandbox.XImageB=com.sun.star.lib.uno.adapter.XInputStreamToInputStreamAdapter?com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter#Mcom.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher(;com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge(C7com.sun.star.lib.uno.environments.java.java_environment&1com.sun.star.lib.uno.environments.remote.IMarshal(6z1com.sun.star.lib.uno.environments.remote.IMessage(X2com.sun.star.lib.uno.environments.remote.IProtocol(2com.sun.star.lib.uno.environments.remote.IReceiver(4com.sun.star.lib.uno.environments.remote.IThreadPool(c3com.sun.star.lib.uno.environments.remote.IUnmarshal(_7com.sun.star.lib.uno.environments.remote.JavaThreadPool(R>com.sun.star.lib.uno.environments.remote.JavaThreadPoolFactory(,com.sun.star.lib.uno.environments.remote.Job(1com.sun.star.lib.uno.environments.remote.JobQueue(X1com.sun.star.lib.uno.environments.remote.Protocol(']1com.sun.star.lib.uno.environments.remote.ThreadId(:com.sun.star.lib.uno.environments.remote.ThreadPoolManager(q;com.sun.star.lib.uno.environments.remote.remote_environment()com.sun.star.lib.uno.helper.ComponentBase#com.sun.star.lib.uno.helper.Factoryƪ.com.sun.star.lib.uno.helper.InterfaceContainer47com.sun.star.lib.uno.helper.MultiTypeInterfaceContainerm'com.sun.star.lib.uno.helper.PropertySeta"com.sun.star.lib.uno.helper.UnoUrl2'com.sun.star.lib.uno.helper.WeakAdapter($com.sun.star.lib.uno.helper.WeakBase2?com.sun.star.lib.uno.protocols.urp.Marshal.M_InterfaceReference" 9x5com.sun.star.lib.uno.protocols.urp.Marshal.M_ThreadId" l&com.sun.star.lib.uno.protocols.urp.urp"5.com.sun.star.lib.uno.typedesc.FieldDescriptionR/com.sun.star.lib.uno.typedesc.MethodDescription-com.sun.star.lib.uno.typedesc.TypeDescriptionӋ/com.sun.star.lib.uno.typeinfo.AttributeTypeInfo.com.sun.star.lib.uno.typeinfo.ConstantTypeInfoL,com.sun.star.lib.uno.typeinfo.MemberTypeInfoZf,com.sun.star.lib.uno.typeinfo.MethodTypeInfo/com.sun.star.lib.uno.typeinfo.ParameterTypeInfo&com.sun.star.lib.uno.typeinfo.TypeInfoOcom.sun.star.lib.uno.Proxy%com.sun.star.lib.util.DisposeListenerZ%com.sun.star.lib.util.DisposeNotifierP_ com.sun.star.lib.util.IInvokableJ!com.sun.star.lib.util.IInvokeHook)com.sun.star.lib.util.NativeLibraryLoader|"com.sun.star.lib.util.StringHelper#fcom.sun.star.lib.util.WeakMapd#com.sun.star.lib.util.WeakMap.Entry {2com.sun.star.linguistic2.XConversionDictionaryList
$com.sun.star.linguistic2.XDictionary[%com.sun.star.linguistic2.XDictionary1܃_)com.sun.star.linguistic2.XDictionaryEntry;1com.sun.star.linguistic2.XDictionaryEventListener(com.sun.star.linguistic2.XDictionaryListԃ}5com.sun.star.linguistic2.XDictionaryListEventListenerQ(com.sun.star.linguistic2.XHyphenatedWord=$com.sun.star.linguistic2.XHyphenatorU6com.sun.star.linguistic2.XLinguServiceEventBroadcaster!+43com.sun.star.linguistic2.XLinguServiceEventListener"_-com.sun.star.linguistic2.XLinguServiceManager#"!com.sun.star.linguistic2.XMeaning&)com.sun.star.linguistic2.XPossibleHyphens&2com.sun.star.linguistic2.XSearchableDictionaryList'+com.sun.star.linguistic2.XSpellAlternatives(&com.sun.star.linguistic2.XSpellChecker)݁'com.sun.star.linguistic2.XSpellChecker1+,com.sun.star.linguistic2.XSupportedLanguages-M*com.sun.star.linguistic2.XSupportedLocales-#com.sun.star.linguistic2.XThesaurus.12com.sun.star.loader.CannotActivateFactoryException/i)com.sun.star.loader.XImplementationLoader0['com.sun.star.mozilla.MenuMultipleChange2)%com.sun.star.mozilla.MenuSingleChange3*com.sun.star.mozilla.XCloseSessionListener4ncom.sun.star.mozilla.XMenuProxy5,'com.sun.star.mozilla.XMenuProxyListener63"$com.sun.star.mozilla.XPluginInstance7U.com.sun.star.mozilla.XPluginInstanceNotifySink9f(com.sun.star.mozilla.XPluginInstancePeer9,com.sun.star.mozilla.XPluginInstanceSyncPeer<&com.sun.star.mozilla.XPluginWindowPeer=2com.sun.star.mozilla.XRemoteServiceManagerProvider>X.com.sun.star.packages.manifest.XManifestReader?.com.sun.star.packages.manifest.XManifestWriter?߀&com.sun.star.packages.zip.ZipConstants@"com.sun.star.packages.zip.ZipEntryDq&com.sun.star.packages.zip.ZipExceptionF=i(com.sun.star.packages.zip.ZipIOExceptionFj3com.sun.star.packages.EncryptionNotAllowedExceptionGi+com.sun.star.packages.NoEncryptionExceptionGyi*com.sun.star.packages.NoRawFormatExceptionGj,com.sun.star.packages.WrongPasswordExceptionHLi*com.sun.star.packages.XDataSinkEncrSupportHq%com.sun.star.plugin.PluginDescriptionK&$#com.sun.star.plugin.PluginExceptionLJcom.sun.star.plugin.PluginModeM6"com.sun.star.plugin.PluginVariableM="com.sun.star.plugin.XPluginN_"com.sun.star.plugin.XPluginContextOu"com.sun.star.plugin.XPluginManagerTi)com.sun.star.presentation.AnimationEffectW *(com.sun.star.presentation.AnimationSpeedށg%com.sun.star.presentation.ClickActionE$com.sun.star.presentation.FadeEffectє_+com.sun.star.presentation.PresentationRange05com.sun.star.presentation.XCustomPresentationSupplier"0com.sun.star.presentation.XHandoutMasterSupplierр'com.sun.star.presentation.XPresentationw+com.sun.star.presentation.XPresentationPage /com.sun.star.presentation.XPresentationSupplier'com.sun.star.reflection.FieldAccessModek0com.sun.star.reflection.InvalidTypeNameException+i1com.sun.star.reflection.InvocationTargetException"com.sun.star.reflection.MethodMode/com.sun.star.reflection.NoSuchTypeNameException-i!com.sun.star.reflection.ParamInfo'!com.sun.star.reflection.ParamMode<2com.sun.star.reflection.TypeDescriptionSearchDepthL-com.sun.star.reflection.XArrayTypeDescriptionE0com.sun.star.reflection.XCompoundTypeDescription/0com.sun.star.reflection.XConstantTypeDescriptionI1com.sun.star.reflection.XConstantsTypeDescriptionꀽ,com.sun.star.reflection.XEnumTypeDescription!com.sun.star.reflection.XIdlArray|J!com.sun.star.reflection.XIdlClassƃ)com.sun.star.reflection.XIdlClassProvider!com.sun.star.reflection.XIdlField>"com.sun.star.reflection.XIdlField2"com.sun.star.reflection.XIdlMemberҀ"com.sun.star.reflection.XIdlMethod2&com.sun.star.reflection.XIdlReflectionʀ0com.sun.star.reflection.XIndirectTypeDescription:com.sun.star.reflection.XInterfaceAttributeTypeDescriptiony7com.sun.star.reflection.XInterfaceMemberTypeDescriptionR7com.sun.star.reflection.XInterfaceMethodTypeDescriptionY1com.sun.star.reflection.XInterfaceTypeDescription`!(com.sun.star.reflection.XMethodParameter.com.sun.star.reflection.XModuleTypeDescription0com.sun.star.reflection.XPropertyTypeDescription7%com.sun.star.reflection.XProxyFactory/com.sun.star.reflection.XServiceTypeDescriptionȁ1com.sun.star.reflection.XSingletonTypeDescriptionż(com.sun.star.reflection.XTypeDescriptionv3com.sun.star.reflection.XTypeDescriptionEnumeration09com.sun.star.reflection.XTypeDescriptionEnumerationAccess-com.sun.star.reflection.XUnionTypeDescriptionɨ;com.sun.star.registry.CannotRegisterImplementationExceptiongi.com.sun.star.registry.InvalidRegistryExceptioni+com.sun.star.registry.InvalidValueException9i,com.sun.star.registry.MergeConflictException̢i%com.sun.star.registry.RegistryKeyType'com.sun.star.registry.RegistryValueType1com.sun.star.registry.XImplementationRegistration"com.sun.star.registry.XRegistryKey%com.sun.star.registry.XSimpleRegistrył.com.sun.star.resource.MissingResourceExceptionpcom.sun.star.resource.XLocale%com.sun.star.resource.XResourceBundleO+com.sun.star.resource.XResourceBundleLoaderDcom.sun.star.scanner.ScanError˂V#com.sun.star.scanner.ScannerContext!%com.sun.star.scanner.ScannerExceptionȀ$com.sun.star.scanner.XScannerManager"com.sun.star.script.AllEventObjectIy*com.sun.star.script.CannotConvertException%0com.sun.star.script.CannotCreateAdapterExceptioni&com.sun.star.script.ContextInformationPcom.sun.star.script.FailReason܀%com.sun.star.script.FinishEngineEventځ- com.sun.star.script.FinishReason=(com.sun.star.script.InterruptEngineEventD#com.sun.star.script.InterruptReason
"com.sun.star.script.InvocationInfo:com.sun.star.script.MemberTypeseAccessE"(com.sun.star.sdb.XDatabaseAccessListenerG7%com.sun.star.sdb.XDatabaseEnvironmentHPc'com.sun.star.sdb.XFormDocumentsSupplierI-com.sun.star.sdb.XInteractionSupplyParametersJY$com.sun.star.sdb.XParametersSupplierK!com.sun.star.sdb.XQueriesSupplierK*com.sun.star.sdb.XQueryDefinitionsSupplierLU)com.sun.star.sdb.XReportDocumentsSupplierL!com.sun.star.sdb.XResultSetAccessM*com.sun.star.sdb.XRowSetApproveBroadcasterNe'com.sun.star.sdb.XRowSetApproveListenerOs9 com.sun.star.sdb.XRowSetSupplierP%com.sun.star.sdb.XSQLErrorBroadcasterQu"com.sun.star.sdb.XSQLErrorListenerRo"com.sun.star.sdb.XSQLQueryComposerS)com.sun.star.sdb.XSQLQueryComposerFactoryU&com.sun.star.sdbc.BatchUpdateExceptionVcom.sun.star.sdbc.BestRowScopeWMcom.sun.star.sdbc.BestRowTypeXIcom.sun.star.sdbc.ChangeActionXKQcom.sun.star.sdbc.ChangeEventXcom.sun.star.sdbc.ColumnSearchY=Lcom.sun.star.sdbc.ColumnTypeYIcom.sun.star.sdbc.ColumnValueYR com.sun.star.sdbc.DataTruncationZ$_com.sun.star.sdbc.DataType[com.sun.star.sdbc.Deferrability]E[$com.sun.star.sdbc.DriverPropertyInfo]d com.sun.star.sdbc.FetchDirection_Gcom.sun.star.sdbc.IndexType_K`com.sun.star.sdbc.KeyRule_o!com.sun.star.sdbc.ProcedureColumn`j!com.sun.star.sdbc.ProcedureResult`C&com.sun.star.sdbc.ResultSetConcurrency`;com.sun.star.sdbc.ResultSetTypea`com.sun.star.sdbc.SQLExceptionab"com.sun.star.sdbc.SQLWarningb&com.sun.star.sdbc.TransactionIsolationc com.sun.star.sdbc.XArrayc!com.sun.star.sdbc.XBatchExecutionfq#com.sun.star.sdbc.XBlobgcom.sun.star.sdbc.XClobimcom.sun.star.sdbc.XCloseablekdcom.sun.star.sdbc.XColumnLocatelcom.sun.star.sdbc.XConnectionlcom.sun.star.sdbc.XDataSourcermd#com.sun.star.sdbc.XDatabaseMetaDatasѠ/com.sun.star.sdbc.XDriverncom.sun.star.sdbc.XDriverAccessv com.sun.star.sdbc.XDriverManager%%com.sun.star.sdbc.XGeneratedResultSetȀ%com.sun.star.sdbc.XIsolatedConnection"com.sun.star.sdbc.XMultipleResults -4 com.sun.star.sdbc.XOutParameters>+com.sun.star.sdbc.XParametersi#com.sun.star.sdbc.XPooledConnection)com.sun.star.sdbc.XPreparedBatchExecutionс$com.sun.star.sdbc.XPreparedStatementcom.sun.star.sdbc.XRef_com.sun.star.sdbc.XResultSetn$com.sun.star.sdbc.XResultSetMetaData&,com.sun.star.sdbc.XResultSetMetaDataSupplier¦"com.sun.star.sdbc.XResultSetUpdateicom.sun.star.sdbc.XRow, com.sun.star.sdbc.XRowSetL)!com.sun.star.sdbc.XRowSetListenerucom.sun.star.sdbc.XRowUpdate͑com.sun.star.sdbc.XSQLDataoncom.sun.star.sdbc.XSQLInput݅com.sun.star.sdbc.XSQLOutpute[com.sun.star.sdbc.XStatementcom.sun.star.sdbc.XStruct{#com.sun.star.sdbc.XWarningsSupplier㙀com.sun.star.sdbcx.CheckOptionB"com.sun.star.sdbcx.CompareBookmarkkcom.sun.star.sdbcx.KeyType/Fcom.sun.star.sdbcx.Privilegeu"com.sun.star.sdbcx.PrivilegeObjectAcom.sun.star.sdbcx.XAlterTableRcom.sun.star.sdbcx.XAppend com.sun.star.sdbcx.XAuthorizable#com.sun.star.sdbcx.XColumnsSupplierˀ!com.sun.star.sdbcx.XCreateCatalogk*com.sun.star.sdbcx.XDataDefinitionSupplierb)com.sun.star.sdbcx.XDataDescriptorFactorycom.sun.star.sdbcx.XDeleteRowscom.sun.star.sdbcx.XDropKQcom.sun.star.sdbcx.XDropCatalog -"com.sun.star.sdbcx.XGroupsSupplier#com.sun.star.sdbcx.XIndexesSupplierE com.sun.star.sdbcx.XKeysSupplier倞com.sun.star.sdbcx.XRenamecom.sun.star.sdbcx.XRowLocatecU"com.sun.star.sdbcx.XTablesSuppliercom.sun.star.sdbcx.XUserW!com.sun.star.sdbcx.XUsersSupplier*!com.sun.star.sdbcx.XViewsSupplierȀ,com.sun.star.security.AccessControlExceptionf#com.sun.star.security.AllPermissionIm'com.sun.star.security.RuntimePermission+com.sun.star.security.XAccessControlContext:'com.sun.star.security.XAccessController)com.sun.star.security.XAction,com.sun.star.security.XPolicyπcom.sun.star.setup.ActionTypecom.sun.star.setup.BaseActionO!com.sun.star.setup.CopyFileAction+"com.sun.star.setup.DeleteDirAction#com.sun.star.setup.DeleteFileActionӁ%com.sun.star.setup.DeleteFolderAction )com.sun.star.setup.DeleteFolderItemAction -[!com.sun.star.setup.DownloadActionacom.sun.star.setup.FontAction['%com.sun.star.setup.InstallEnvironment
"com.sun.star.setup.InstallResponse+com.sun.star.setup.InstallType com.sun.star.setup.MakeDirAction>#com.sun.star.setup.MakeFolderAction#'com.sun.star.setup.MakeFolderItemAction%com.sun.star.setup.MakeShortcutActionсncom.sun.star.setup.MirrorEntry?com.sun.star.setup.ModuleInfogcom.sun.star.setup.ModuleStatecom.sun.star.setup.OSType K$com.sun.star.setup.ProfileItemAction#Y$com.sun.star.setup.ResponseErrorCode$,com.sun.star.setup.SizeInfo&com.sun.star.setup.UnzipAction&lcom.sun.star.setup.UpdateType)L~$com.sun.star.setup.VersionIdentifier*ʁy(com.sun.star.setup.WindowsRegistryAction,Ccom.sun.star.setup.XSetup.ocom.sun.star.sheet.Border4tR!com.sun.star.sheet.CellDeleteMode5Ɓcom.sun.star.sheet.CellFlags7!com.sun.star.sheet.CellInsertMode8-$com.sun.star.sheet.ConditionOperator9`!com.sun.star.sheet.DataImportMode=Q,com.sun.star.sheet.DataPilotFieldOrientation>тcom.sun.star.sheet.DataResult@"com.sun.star.sheet.DataResultFlagsAfFcom.sun.star.sheet.FillDateModeA com.sun.star.sheet.FillDirectionCtcom.sun.star.sheet.FillModeE#com.sun.star.sheet.FilterConnectionF!com.sun.star.sheet.FilterOperatorG com.sun.star.sheet.FormulaResultKB#com.sun.star.sheet.FunctionArgumentKր#com.sun.star.sheet.FunctionCategoryL"com.sun.star.sheet.GeneralFunctionMcom.sun.star.sheet.GoalResultQX com.sun.star.sheet.LocalizedNameQcom.sun.star.sheet.MemberResultR$com.sun.star.sheet.MemberResultFlagsSxK com.sun.star.sheet.MoveDirectionSR!com.sun.star.sheet.NamedRangeFlagTk!com.sun.star.sheet.PasteOperationT&com.sun.star.sheet.RangeSelectionEventVNcom.sun.star.sheet.ResultEventV com.sun.star.sheet.SheetLinkModeWA$com.sun.star.sheet.StatusBarFunctionX倆!com.sun.star.sheet.SubTotalColumnYk#com.sun.star.sheet.TableFilterFieldZ-%com.sun.star.sheet.TableOperationMode[V%com.sun.star.sheet.TablePageBreakData],com.sun.star.sheet.TableValidationVisibility]X'com.sun.star.sheet.ValidationAlertStyle]!com.sun.star.sheet.ValidationType_com.sun.star.sheet.XAddInb/Zcom.sun.star.sheet.XAreaLinkd5com.sun.star.sheet.XAreaLinkse#%com.sun.star.sheet.XArrayFormulaRangef com.sun.star.sheet.XCalculatableg#com.sun.star.sheet.XCellAddressableh,com.sun.star.sheet.XCellFormatRangesSupplieri=(com.sun.star.sheet.XCellRangeAddressablei瀦!com.sun.star.sheet.XCellRangeDataj$com.sun.star.sheet.XCellRangeFormulakJ%com.sun.star.sheet.XCellRangeMovementl
%com.sun.star.sheet.XCellRangeReferrerm#com.sun.star.sheet.XCellRangesQueryncom.sun.star.sheet.XCellSeriesq5<&com.sun.star.sheet.XCompatibilityNamesrq"com.sun.star.sheet.XConsolidatables.+com.sun.star.sheet.XConsolidationDescriptort<com.sun.star.sheet.XDDELinkv'com.sun.star.sheet.XDataPilotDescriptorw*com.sun.star.sheet.XDataPilotMemberResultsz$com.sun.star.sheet.XDataPilotResults{-"com.sun.star.sheet.XDataPilotTable{Ȁ#com.sun.star.sheet.XDataPilotTables|e+com.sun.star.sheet.XDataPilotTablesSupplier}怩!com.sun.star.sheet.XDatabaseRange~"com.sun.star.sheet.XDatabaseRanges&com.sun.star.sheet.XDimensionsSupplierv$com.sun.star.sheet.XDocumentAuditing#com.sun.star.sheet.XFillAcrossSheet com.sun.star.sheet.XFormulaQuery-"com.sun.star.sheet.XFunctionAccess$(com.sun.star.sheet.XFunctionDescriptions7com.sun.star.sheet.XGoalSeek
'com.sun.star.sheet.XHeaderFooterContent'com.sun.star.sheet.XHierarchiesSupplier퀤com.sun.star.sheet.XLabelRangeYcom.sun.star.sheet.XLabelRanges"com.sun.star.sheet.XLevelsSupplier߀#com.sun.star.sheet.XMembersSupplier~%com.sun.star.sheet.XMultipleOperationcom.sun.star.sheet.XNamedRange;gcom.sun.star.sheet.XNamedRangescom.sun.star.sheet.XPrintAreasEu"com.sun.star.sheet.XRangeSelection=0com.sun.star.sheet.XRangeSelectionChangeListener*com.sun.star.sheet.XRangeSelectionListener#com.sun.star.sheet.XRecentFunctions"com.sun.star.sheet.XResultListenerlcom.sun.star.sheet.XScenario5com.sun.star.sheet.XScenariosH%com.sun.star.sheet.XScenariosSupplierO#com.sun.star.sheet.XSheetAnnotation)com.sun.star.sheet.XSheetAnnotationAnchor$com.sun.star.sheet.XSheetAnnotations,com.sun.star.sheet.XSheetAnnotationsSupplier!com.sun.star.sheet.XSheetAuditing5#com.sun.star.sheet.XSheetCellCursorD"com.sun.star.sheet.XSheetCellRangeS+com.sun.star.sheet.XSheetCellRangeContainer#com.sun.star.sheet.XSheetCellRanges"com.sun.star.sheet.XSheetCondition+com.sun.star.sheet.XSheetConditionalEntries -)com.sun.star.sheet.XSheetConditionalEntry瀽)com.sun.star.sheet.XSheetFilterDescriptor#com.sun.star.sheet.XSheetFilterable%com.sun.star.sheet.XSheetFilterableEx!com.sun.star.sheet.XSheetLinkableu"com.sun.star.sheet.XSheetOperation} com.sun.star.sheet.XSheetOutlineiG"com.sun.star.sheet.XSheetPageBreak!com.sun.star.sheet.XSheetPastablecom.sun.star.sheet.XSpreadsheetc'com.sun.star.sheet.XSpreadsheetDocumentr#com.sun.star.sheet.XSpreadsheetView com.sun.star.sheet.XSpreadsheets*(com.sun.star.sheet.XSubTotalCalculatable)&com.sun.star.sheet.XSubTotalDescriptorA!com.sun.star.sheet.XSubTotalField'2com.sun.star.sheet.XUniqueCellFormatRangesSupplier$"com.sun.star.sheet.XUsedAreaCursorԀ!com.sun.star.sheet.XViewFreezablecom.sun.star.sheet.XViewPaneG4%com.sun.star.sheet.XViewPanesSupplier{!com.sun.star.sheet.XViewSplitable "com.sun.star.sheet.XVolatileResult>com.sun.star.sheet._NamedRange4kcom.sun.star.style.BreakType_com.sun.star.style.CaseMapr com.sun.star.style.DropCapFormatp"com.sun.star.style.GraphicLocation&com.sun.star.style.HorizontalAlignment_%com.sun.star.style.LineNumberPositionkYcom.sun.star.style.LineSpacingĀ"com.sun.star.style.LineSpacingModeLX com.sun.star.style.NumberingTypeʤs"com.sun.star.style.PageStyleLayout"com.sun.star.style.ParagraphAdjustϣ)com.sun.star.style.ParagraphStyleCategorytvcom.sun.star.style.TabAlignꁤcom.sun.star.style.TabStopӎ$com.sun.star.style.VerticalAlignment|U$com.sun.star.style.XDefaultsSupplierрcom.sun.star.style.XStyleo&"com.sun.star.style.XStyleConditionו)com.sun.star.style.XStyleFamiliesSupplierzcom.sun.star.style.XStyleLoader com.sun.star.svg.XSVGPrinter<com.sun.star.svg.XSVGWriterGcom.sun.star.sync.SyncActioncom.sun.star.sync.SyncElementcom.sun.star.sync.SyncEventဋcom.sun.star.sync.SyncInfolcom.sun.star.sync.SyncModecom.sun.star.sync.SyncOptions~com.sun.star.sync.SyncScheme=com.sun.star.sync.SyncType com.sun.star.sync.XSyncCollector⦃_com.sun.star.sync.XSynchronizer*com.sun.star.sync2.BadPartnershipException礀)com.sun.star.system.SimpleMailClientFlagsyZ/com.sun.star.system.SystemShellExecuteExceptionӀ+com.sun.star.system.SystemShellExecuteFlagsH"com.sun.star.system.XProxySettingsՂf%com.sun.star.system.XSimpleMailClient;L-com.sun.star.system.XSimpleMailClientSupplier퇀&com.sun.star.system.XSimpleMailMessage5'com.sun.star.system.XSystemShellExecuteācom.sun.star.table.BorderLineπcom.sun.star.table.CellAddress"com.sun.star.table.CellContentType6"com.sun.star.table.CellHoriJustifyĂ"com.sun.star.table.CellOrientationځ#com.sun.star.table.CellRangeAddress"com.sun.star.table.CellVertJustifyQcom.sun.star.table.ShadowFormat!com.sun.star.table.ShadowLocationcom.sun.star.table.TableBorder҃c#com.sun.star.table.TableOrientation5!com.sun.star.table.TableSortFieldE%com.sun.star.table.TableSortFieldTypeځt#com.sun.star.table.XAutoFormattableNcom.sun.star.table.XCell5com.sun.star.table.XCellCursorEcom.sun.star.table.XCellRange/"com.sun.star.table.XColumnRowRange com.sun.star.table.XTableChart -scom.sun.star.table.XTableCharts''com.sun.star.table.XTableChartsSupplier
= com.sun.star.table.XTableColumns
ـcom.sun.star.table.XTableRows.com.sun.star.task.ClassifiedInteractionRequest_)com.sun.star.task.DocumentPasswordRequestm-"com.sun.star.task.ErrorCodeRequest+com.sun.star.task.InteractionClassificationQ'com.sun.star.task.MasterPasswordRequest#com.sun.star.task.NoMasterException݀!com.sun.star.task.PasswordRequest܁;%com.sun.star.task.PasswordRequestMode-com.sun.star.task.UnsupportedOverwriteRequestcom.sun.star.task.UrlRecordcom.sun.star.task.UserRecordcom.sun.star.task.XAsyncJob#com.sun.star.task.XInteractionAbortz%com.sun.star.task.XInteractionApprovez*com.sun.star.task.XInteractionContinuation~(com.sun.star.task.XInteractionDisapprovez%com.sun.star.task.XInteractionHandler&com.sun.star.task.XInteractionPassword-%com.sun.star.task.XInteractionRequest#com.sun.star.task.XInteractionRetry zcom.sun.star.task.XJob!Bcom.sun.star.task.XJobExecutor"6com.sun.star.task.XJobListener"ɀ$com.sun.star.task.XPasswordContainer#A"com.sun.star.task.XStatusIndicator&ŀ)com.sun.star.task.XStatusIndicatorFactory'À*com.sun.star.task.XStatusIndicatorSupplier(n)com.sun.star.test.bridge.TestDataElements)$com.sun.star.test.bridge.TestElement*ׁ|!com.sun.star.test.bridge.TestEnum,S4#com.sun.star.test.bridge.TestSimple.$com.sun.star.test.bridge.XBridgeTest05%com.sun.star.test.bridge.XBridgeTest21(com.sun.star.test.bridge.XBridgeTestBase7}'com.sun.star.test.bridge.XRecursiveCallA*com.sun.star.test.performance.ComplexTypesAӁ)com.sun.star.test.performance.SimpleTypesCe^.com.sun.star.test.performance.XPerformanceTestDÇcom.sun.star.test.TestEventL}com.sun.star.test.XSimpleTestMXcom.sun.star.test.XTestO';com.sun.star.test.XTestListenerQb%com.sun.star.text.AuthorDisplayFormatRvb'com.sun.star.text.BibliographyDataFieldRQ&com.sun.star.text.BibliographyDataTypeU)com.sun.star.text.ChapterFormatVx*com.sun.star.text.CharacterCompressionTypeWW`"com.sun.star.text.ControlCharacterW#com.sun.star.text.DateDisplayFormatXY#com.sun.star.text.DocumentStatisticYW'com.sun.star.text.FilenameDisplayFormatYu[com.sun.star.text.FontEmphasisYЀcom.sun.star.text.FontReliefZL#com.sun.star.text.FootnoteNumberingZWcom.sun.star.text.GraphicCrop[G!com.sun.star.text.HoriOrientation['com.sun.star.text.HoriOrientationFormat\"com.sun.star.text.HorizontalAdjust]oK-com.sun.star.text.InvalidTextContentException^ com.sun.star.text.MailMergeEvent_com.sun.star.text.MailMergeType`c8com.sun.star.text.NotePrintMode`~ com.sun.star.text.PageNumberTypebA$com.sun.star.text.ParagraphVertAligncZn!com.sun.star.text.PlaceholderTypecm$com.sun.star.text.ReferenceFieldPartd5&com.sun.star.text.ReferenceFieldSourced com.sun.star.text.RelOrientationewcom.sun.star.text.RubyAdjustfE!com.sun.star.text.SectionFileLinkg!com.sun.star.text.SetVariableTypeh[com.sun.star.text.SizeTypeiF&com.sun.star.text.TableColumnSeparatoriR'com.sun.star.text.TemplateDisplayFormatizcom.sun.star.text.TextColumnj_'com.sun.star.text.TextContentAnchorTypej$com.sun.star.text.TextGridModem#P#com.sun.star.text.TimeDisplayFormatmscom.sun.star.text.UserDataPartn !com.sun.star.text.UserFieldFormato/E!com.sun.star.text.VertOrientationot'com.sun.star.text.VertOrientationFormatpHcom.sun.star.text.WrapTextModepcom.sun.star.text.WritingModer2com.sun.star.text.WritingMode2t)f$com.sun.star.text.XAutoTextContainertt com.sun.star.text.XAutoTextEntryv com.sun.star.text.XAutoTextGroupvj%com.sun.star.text.XBookmarkInsertTooly$com.sun.star.text.XBookmarksSuppliery〢+com.sun.star.text.XChapterNumberingSupplierz+com.sun.star.text.XDefaultNumberingProvider{56%com.sun.star.text.XDependentTextField|k com.sun.star.text.XDocumentIndex}$com.sun.star.text.XDocumentIndexMark~**com.sun.star.text.XDocumentIndexesSupplier~ꀩ+com.sun.star.text.XEndnotesSettingsSupplier#com.sun.star.text.XEndnotesSupplier9com.sun.star.text.XFootnote,com.sun.star.text.XFootnotesSettingsSupplier̀$com.sun.star.text.XFootnotesSuppliertcom.sun.star.text.XHeaderFooterR(com.sun.star.text.XHeaderFooterPageStyle*com.sun.star.text.XLineNumberingProperties뀭(com.sun.star.text.XLineNumberingSupplier'com.sun.star.text.XMailMergeBroadcaster -$com.sun.star.text.XMailMergeListenercom.sun.star.text.XModuleAk%com.sun.star.text.XNumberingFormatter)com.sun.star.text.XNumberingRulesSupplier$com.sun.star.text.XNumberingTypeInfoW1com.sun.star.text.XPageCursor` com.sun.star.text.XPagePrintableT"com.sun.star.text.XParagraphCursor<g)com.sun.star.text.XReferenceMarksSupplier,com.sun.star.text.XRelativeTextContentInsertJ,com.sun.star.text.XRelativeTextContentRemove܁N com.sun.star.text.XRubySelection*!com.sun.star.text.XSentenceCursoracom.sun.star.text.XSimpleText|com.sun.star.text.XTextVscom.sun.star.text.XTextColumnsɁ.com.sun.star.text.XTextContentcom.sun.star.text.XTextCursorcom.sun.star.text.XTextDocument%com.sun.star.text.XTextEmbeddedObject(.com.sun.star.text.XTextEmbeddedObjectsSupplier
com.sun.star.text.XTextField%com.sun.star.text.XTextFieldsSupplier+com.sun.star.text.XTextFrame%com.sun.star.text.XTextFramesSupplier-com.sun.star.text.XTextGraphicObjectsSupplierKcom.sun.star.text.XTextRange6#com.sun.star.text.XTextRangeCompare(!com.sun.star.text.XTextRangeMovercom.sun.star.text.XTextSectionY'com.sun.star.text.XTextSectionsSupplier5%com.sun.star.text.XTextShapesSupplierڀcom.sun.star.text.XTextTablez"com.sun.star.text.XTextTableCursor)%com.sun.star.text.XTextTablesSupplier%!com.sun.star.text.XTextViewCursorȀ)com.sun.star.text.XTextViewCursorSuppliercom.sun.star.text.XWordCursor<I,com.sun.star.ucb.AlreadyInitializedExceptioni&com.sun.star.ucb.AuthenticationRequest#com.sun.star.ucb.CHAOSProgressStartcom.sun.star.ucb.Command7(com.sun.star.ucb.CommandAbortedExceptioni'com.sun.star.ucb.CommandFailedExceptionlcom.sun.star.ucb.CommandInfo<"com.sun.star.ucb.CommandInfoChangeH'com.sun.star.ucb.CommandInfoChangeEventYcom.sun.star.ucb.ConnectionMode*:com.sun.star.ucb.ContentActiondq%com.sun.star.ucb.ContentCreationErrorՂ)com.sun.star.ucb.ContentCreationExceptioncom.sun.star.ucb.ContentEvent"com.sun.star.ucb.ContentInfo%com.sun.star.ucb.ContentInfoAttribute܀$com.sun.star.ucb.ContentProviderInfof+com.sun.star.ucb.ContentResultSetCapabilityG(com.sun.star.ucb.Cookieocom.sun.star.ucb.CookiePolicy-:com.sun.star.ucb.CookieRequestgcom.sun.star.ucb.CrossReferencec$com.sun.star.ucb.DocumentHeaderField"com.sun.star.ucb.DocumentStoreModeí4com.sun.star.ucb.DuplicateCommandIdentifierExceptionĹi+com.sun.star.ucb.DuplicateProviderException"icom.sun.star.ucb.Errorŋ!com.sun.star.ucb.ExportStreamInfoϪcom.sun.star.ucb.FetchErrormQcom.sun.star.ucb.FetchResultо#com.sun.star.ucb.FileSystemNotationpcom.sun.star.ucb.FolderList3/"com.sun.star.ucb.FolderListCommandbU com.sun.star.ucb.FolderListEntryԷ*.com.sun.star.ucb.GlobalTransferCommandArgumentl%com.sun.star.ucb.HandleCookiesRequestMcom.sun.star.ucb.IOErrorCode+com.sun.star.ucb.IllegalIdentifierExceptioni&com.sun.star.ucb.InsertCommandArgumentp(com.sun.star.ucb.InteractiveAppException30com.sun.star.ucb.InteractiveAugmentedIOException*Z3com.sun.star.ucb.InteractiveBadTransferURLExceptioni*com.sun.star.ucb.InteractiveCHAOSExceptionS+com.sun.star.ucb.InteractiveFileIOException@.'com.sun.star.ucb.InteractiveIOExceptionn)3com.sun.star.ucb.InteractiveNetworkConnectException뗁,com.sun.star.ucb.InteractiveNetworkException쨀3com.sun.star.ucb.InteractiveNetworkGeneralExceptionT3com.sun.star.ucb.InteractiveNetworkOffLineException0com.sun.star.ucb.InteractiveNetworkReadException7com.sun.star.ucb.InteractiveNetworkResolveNameExceptiona1com.sun.star.ucb.InteractiveNetworkWriteException0com.sun.star.ucb.InteractiveWrongMediumExceptioncom.sun.star.ucb.Linkcom.sun.star.ucb.ListActioncom.sun.star.ucb.ListActionTypecom.sun.star.ucb.ListEvent,com.sun.star.ucb.ListenerAlreadySetExceptionicom.sun.star.ucb.Locktcom.sun.star.ucb.LockDepth#com.sun.star.ucb.LockEntrycom.sun.star.ucb.LockScopecom.sun.star.ucb.LockTypeꀮ,com.sun.star.ucb.MissingInputStreamExceptioni+com.sun.star.ucb.MissingPropertiesException#com.sun.star.ucb.PropertyValueStatecom.sun.star.ucb.RecipientInfo
^'com.sun.star.ucb.RememberAuthenticationDl2com.sun.star.ucb.RemoteContentProviderChangeActionN1com.sun.star.ucb.RemoteContentProviderChangeEvent#com.sun.star.ucb.ResultSetExceptioncom.sun.star.ucb.Rulecom.sun.star.ucb.RuleActioǹcom.sun.star.ucb.RuleOperatorcom.sun.star.ucb.RuleSetbcom.sun.star.ucb.RuleTermA#&com.sun.star.ucb.SearchCommandArgumentd com.sun.star.ucb.SearchCriteriumcom.sun.star.ucb.SearchInfoF com.sun.star.ucb.SearchRecursion/Ecom.sun.star.ucb.SendInfotcom.sun.star.ucb.SendMediaTypes/)com.sun.star.ucb.ServiceNotFoundException icom.sun.star.ucb.SortingInfo z"com.sun.star.ucb.SynchronizePolicy!')com.sun.star.ucb.TransferCommandOperation"hcom.sun.star.ucb.TransferInfo$com.sun.star.ucb.TransferResult%,com.sun.star.ucb.UnsupportedCommandException%i-com.sun.star.ucb.UnsupportedDataSinkException&[.com.sun.star.ucb.UnsupportedNameClashException')-com.sun.star.ucb.UnsupportedOpenModeException'‸!com.sun.star.ucb.VerificationMode(F.com.sun.star.ucb.WelcomeDynamicResultSetStruct)com.sun.star.ucb.XAnyCompare*#com.sun.star.ucb.XAnyCompareFactory+h/com.sun.star.ucb.XCachedContentResultSetFactory,"3com.sun.star.ucb.XCachedContentResultSetStubFactory-/com.sun.star.ucb.XCachedDynamicResultSetFactory-3com.sun.star.ucb.XCachedDynamicResultSetStubFactory.$com.sun.star.ucb.XCommandEnvironment0com.sun.star.ucb.XCommandInfo1ʁ+com.sun.star.ucb.XCommandInfoChangeListener3+com.sun.star.ucb.XCommandInfoChangeNotifier4f"com.sun.star.ucb.XCommandProcessor5X#com.sun.star.ucb.XCommandProcessor26܀com.sun.star.ucb.XContent7zjcom.sun.star.ucb.XContentAccess8 com.sun.star.ucb.XContentCreator9&com.sun.star.ucb.XContentEventListener:#com.sun.star.ucb.XContentIdentifier;*com.sun.star.ucb.XContentIdentifierFactory<c*com.sun.star.ucb.XContentIdentifierMapping=%!com.sun.star.ucb.XContentProvider>X(com.sun.star.ucb.XContentProviderFactory@ (com.sun.star.ucb.XContentProviderManager@ǂ)com.sun.star.ucb.XContentProviderSupplierB׀$com.sun.star.ucb.XContentTransmitterC~com.sun.star.ucb.XDataContainerD-J"com.sun.star.ucb.XDynamicResultSetEw**com.sun.star.ucb.XDynamicResultSetListenerGcom.sun.star.ucb.XFetchProviderHB/com.sun.star.ucb.XFetchProviderForContentAccessHf)com.sun.star.ucb.XFileIdentifierConverterJV@+com.sun.star.ucb.XInteractionCookieHandlingK,com.sun.star.ucb.XInteractionHandlerSupplierL0com.sun.star.ucb.XInteractionReplaceExistingDataM"z1com.sun.star.ucb.XInteractionSupplyAuthenticationM'com.sun.star.ucb.XInteractionSupplyNameP.com.sun.star.ucb.XParameterizedContentProviderQR'com.sun.star.ucb.XPersistentPropertySetR!com.sun.star.ucb.XProgressHandlerS!com.sun.star.ucb.XPropertyMatcherTt(com.sun.star.ucb.XPropertyMatcherFactoryUD%com.sun.star.ucb.XPropertySetRegistryV,com.sun.star.ucb.XPropertySetRegistryFactoryW
com.sun.star.ucb.XRecyclerWӀ/com.sun.star.ucb.XRemoteContentProviderAcceptorX[0com.sun.star.ucb.XRemoteContentProviderActivatorY5com.sun.star.ucb.XRemoteContentProviderChangeListenerZ5com.sun.star.ucb.XRemoteContentProviderChangeNotifier[F8com.sun.star.ucb.XRemoteContentProviderConnectionControl\̀2com.sun.star.ucb.XRemoteContentProviderDistributor]3com.sun.star.ucb.XRemoteContentProviderDoneListener_D/com.sun.star.ucb.XRemoteContentProviderSupplier`
"com.sun.star.ucb.XSimpleFileAccess`Ո#com.sun.star.ucb.XSimpleFileAccess2h#com.sun.star.ucb.XSimpleFileAccess3i`/com.sun.star.ucb.XSortedDynamicResultSetFactoryk"'&com.sun.star.ucb.XSourceInitializationlI2com.sun.star.ui.dialogs.CommonFilePickerElementIdsm&com.sun.star.ui.dialogs.ControlActionsmށ1com.sun.star.ui.dialogs.ExecutableDialogExceptionni/com.sun.star.ui.dialogs.ExecutableDialogResultsoL54com.sun.star.ui.dialogs.ExtendedFilePickerElementIdso'com.sun.star.ui.dialogs.FilePickerEventq:/com.sun.star.ui.dialogs.FilePreviewImageFormatsq(-com.sun.star.ui.dialogs.ListboxControlActionsq+com.sun.star.ui.dialogs.TemplateDescriptionr&com.sun.star.ui.dialogs.XControlAccesstYq+com.sun.star.ui.dialogs.XControlInformationuʁ)com.sun.star.ui.dialogs.XExecutableDialogw#com.sun.star.ui.dialogs.XFilePickerx50com.sun.star.ui.dialogs.XFilePickerControlAccessyk+com.sun.star.ui.dialogs.XFilePickerListener{"+com.sun.star.ui.dialogs.XFilePickerNotifier|$com.sun.star.ui.dialogs.XFilePreview}+com.sun.star.ui.dialogs.XFilterGroupManager|&com.sun.star.ui.dialogs.XFilterManagerf^%com.sun.star.ui.dialogs.XFolderPickerāY*com.sun.star.ui.ActionTriggerSeparatorTypeJ'com.sun.star.ui.ContextMenuExecuteEventg,com.sun.star.ui.ContextMenuInterceptorAction(com.sun.star.ui.XContextMenuInterception'com.sun.star.ui.XContextMenuInterceptor'com.sun.star.uno.Any -3com.sun.star.uno.AnyConverter=Tcom.sun.star.uno.Ascii2com.sun.star.uno.AsciiStringP$com.sun.star.uno.DeploymentExceptionpcom.sun.star.uno.Enum5com.sun.star.uno.Exceptioncom.sun.star.uno.IBridgencom.sun.star.uno.IEnvironment"com.sun.star.uno.IFieldDescriptionـcom.sun.star.uno.IMappingyi#com.sun.star.uno.IMemberDescription―#com.sun.star.uno.IMethodDescriptionwB com.sun.star.uno.IQueryInterface!com.sun.star.uno.ITypeDescriptionY!com.sun.star.uno.MappingExceptionp!com.sun.star.uno.RuntimeExceptionZ"com.sun.star.uno.SecurityExceptionpcom.sun.star.uno.Typecom.sun.star.uno.TypeClasse8com.sun.star.uno.Uikcom.sun.star.uno.UnionnXcom.sun.star.uno.UnoRuntimeƄcom.sun.star.uno.WeakReferencepcom.sun.star.uno.XAdaptercom.sun.star.uno.XAggregation"com.sun.star.uno.XComponentContext̀ com.sun.star.uno.XCurrentContextcom.sun.star.uno.XInterface[Ncom.sun.star.uno.XNamingServiceocom.sun.star.uno.XReferencecom.sun.star.uno.XWeak"com.sun.star.util.logging.LogLevel0!com.sun.star.util.logging.XLoggerā['com.sun.star.util.logging.XLoggerRemote'com.sun.star.util.AliasProgrammaticPair"com.sun.star.util.AtomClassRequest^!com.sun.star.util.AtomDescription com.sun.star.util.CellProtectioncom.sun.star.util.ChangesEvent},$com.sun.star.util.CloseVetoExceptioni!com.sun.star.util.DataEditorEvent%com.sun.star.util.DataEditorEventTypecom.sun.star.util.Datecom.sun.star.util.DateTimeÙcom.sun.star.util.DateTimeRangeĪ#com.sun.star.util.DiskFullExceptionƮpcom.sun.star.util.ElementChange!com.sun.star.util.FileIOExceptioni0com.sun.star.util.MalformedNumberFormatExceptionycom.sun.star.util.MeasureUnit1!com.sun.star.util.ModeChangeEventL%com.sun.star.util.NotNumericExceptionicom.sun.star.util.NumberFormat]"com.sun.star.util.SearchAlgorithmsX_com.sun.star.util.SearchFlagsͷcom.sun.star.util.SearchOptionscom.sun.star.util.SearchResultqcom.sun.star.util.SortFieldZcom.sun.star.util.SortFieldType;Vcom.sun.star.util.Timeӑcom.sun.star.util.URLZMcom.sun.star.util.VetoException֧icom.sun.star.util.XArchivercom.sun.star.util.XAtomServerԁ com.sun.star.util.XCancelManagerڄcom.sun.star.util.XCancellabler~com.sun.star.util.XChainableocom.sun.star.util.XChangesBatch_ "com.sun.star.util.XChangesListenerh"com.sun.star.util.XChangesNotifiercom.sun.star.util.XChangesSetcom.sun.star.util.XCloneable#com.sun.star.util.XCloseBroadcasterS com.sun.star.util.XCloseListenerCcom.sun.star.util.XCloseableYcom.sun.star.util.XDataEditor_%com.sun.star.util.XDataEditorListenern com.sun.star.util.XFlushListener com.sun.star.util.XFlushableŁcom.sun.star.util.XImportableǀcom.sun.star.util.XIndent赀com.sun.star.util.XLinkUpdateX#com.sun.star.util.XLocalizedAliasesۄ com.sun.star.util.XMacroExpander^com.sun.star.util.XMergeable.,com.sun.star.util.XModeChangeApproveListenerр(com.sun.star.util.XModeChangeBroadcaster%com.sun.star.util.XModeChangeListenercom.sun.star.util.XModeSelectorW3com.sun.star.util.XModifiable$com.sun.star.util.XModifyBroadcastere!com.sun.star.util.XModifyListenerY(com.sun.star.util.XNumberFormatPreviewer$com.sun.star.util.XNumberFormatTypes com.sun.star.util.XNumberFormatsQ(com.sun.star.util.XNumberFormatsSupplier%"com.sun.star.util.XNumberFormatter"com.sun.star.util.XPropertyReplacelcom.sun.star.util.XProtectableq"com.sun.star.util.XRefreshListenerucom.sun.star.util.XRefreshable$com.sun.star.util.XReplaceDescriptor(com.sun.star.util.XReplaceable#com.sun.star.util.XSearchDescriptorcom.sun.star.util.XSearchable%com.sun.star.util.XSimpleErrorHandler -Vcom.sun.star.util.XSortable -%com.sun.star.util.XStringAbbreviatioǹcom.sun.star.util.XStringEscape7 com.sun.star.util.XStringMapping
Հ%com.sun.star.util.XStringSubstitutionncom.sun.star.util.XStringWidthcom.sun.star.util.XTextSearchRcom.sun.star.util.XTimeStamped!com.sun.star.util.XURLTransformerc"com.sun.star.util.XUniqueIDFactory뀒com.sun.star.util.XUpdatable}~"com.sun.star.view.DocumentZoomTypecom.sun.star.view.PaperFormat}"com.sun.star.view.PaperOrientationcom.sun.star.view.PrintJobEvent com.sun.star.view.PrintableStateۂX%com.sun.star.view.PrintableStateEvent3 com.sun.star.view.XControlAccesscom.sun.star.view.XLineCursorcom.sun.star.view.XPrintJobԁ&com.sun.star.view.XPrintJobBroadcaster#com.sun.star.view.XPrintJobListener 퀭com.sun.star.view.XPrintPreview!(com.sun.star.view.XPrintSettingsSupplier"com.sun.star.view.XPrintable#"g'com.sun.star.view.XPrintableBroadcaster$
\ No newline at end of file diff --git a/scripting/java/org/openoffice/netbeans/modules/office/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/Bundle.properties deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/Bundle.properties +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/Bundle_en_US.properties b/scripting/java/org/openoffice/netbeans/modules/office/Bundle_en_US.properties deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/Bundle_en_US.properties +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/BuildParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/BuildParcelAction.java deleted file mode 100644 index 9aa998cfe77a..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/BuildParcelAction.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.util.Vector; -import java.util.Enumeration; - -import org.openide.nodes.Node; -import org.openide.util.HelpCtx; -import org.openide.util.RequestProcessor; -import org.openide.actions.BuildAllAction; - -import org.openide.compiler.Compiler; -import org.openide.compiler.CompilerJob; -import org.openide.compiler.CompilerTask; - -import org.openoffice.netbeans.modules.office.utils.FrameworkJarChecker; - -public class BuildParcelAction extends BuildAllAction { - public String getName() { - return "Build"; - } - - protected void performAction(Node[] activatedNodes) { - FrameworkJarChecker.mountDependencies(); - - for (int i = 0; i < activatedNodes.length; i++) { - ArrayList v = new ArrayList(1); - v.addElement(activatedNodes[i]); - - CompilerJob job = createJob(v.elements(), Compiler.DEPTH_INFINITE); - CompilerTask task = job.start(); - task.waitFinished(); - - if (task.isSuccessful()) { - ParcelFolderCookie cookie = (ParcelFolderCookie) - activatedNodes[i].getCookie(ParcelFolderCookie.class); - - if (cookie != null) - cookie.generate(); - } - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/CompileParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/CompileParcelAction.java deleted file mode 100644 index f494c7ab66f0..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/CompileParcelAction.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.openide.nodes.Node; -import org.openide.actions.CompileAllAction; - -import org.openoffice.netbeans.modules.office.utils.FrameworkJarChecker; - -public class CompileParcelAction extends CompileAllAction { - public String getName() { - return "Compile"; - } - - protected void performAction(Node[] activatedNodes) { - FrameworkJarChecker.mountDependencies(); - super.performAction(activatedNodes); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ConfigureParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ConfigureParcelAction.java deleted file mode 100644 index fa64996ced70..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ConfigureParcelAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.openide.nodes.Node; -import org.openide.util.HelpCtx; -import org.openide.util.RequestProcessor; -import org.openide.util.actions.CookieAction; - -import org.openoffice.netbeans.modules.office.utils.FrameworkJarChecker; - -public class ConfigureParcelAction extends CookieAction { - - public String getName() { - return "Configure"; - } - - protected java.lang.Class[] cookieClasses() { - return new Class[] {ParcelFolderCookie.class}; - } - - protected int mode() { - return CookieAction.MODE_EXACTLY_ONE; - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - protected void performAction(final Node[] activatedNodes) { - FrameworkJarChecker.mountDependencies(); - - RequestProcessor.getDefault().post(new Runnable() { - public void run() { - for (int i = 0; i < activatedNodes.length; i++) { - ParcelFolderCookie pfc = (ParcelFolderCookie) - activatedNodes[i].getCookie(ParcelFolderCookie.class); - - if (pfc != null) - pfc.configure(); - } - } - }); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java deleted file mode 100644 index 04a17a8976fc..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.File; -import java.io.IOException; -import java.util.Hashtable; -import java.util.List; -import java.util.ArrayList; -import java.util.Enumeration; - -import javax.swing.JMenuItem; -import javax.swing.JFileChooser; -import javax.swing.filechooser.FileFilter; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.awt.Actions; -import org.openide.nodes.Node; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.RequestProcessor; -import org.openide.util.actions.*; -import org.openide.awt.JMenuPlus; - -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.idesupport.LocalOffice; - -import org.openoffice.netbeans.modules.office.utils.NagDialog; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -public class DeployParcelAction extends CookieAction implements - Presenter.Popup { - - private static final String BROWSE_LABEL = "Office Document..."; - private static final String DEPLOY_LABEL = "Deploy To"; - - public String getName() { - return DEPLOY_LABEL; - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - public JMenuItem getPopupPresenter() { - JMenuPlus menu = new JMenuPlus(DEPLOY_LABEL); - JMenuItem item, user, share; - final OfficeInstallation oi = OfficeSettings.getDefault().getOfficeDirectory(); - - ActionListener listener = new ActionListener() { - public void actionPerformed(ActionEvent e) { - JMenuItem choice = (JMenuItem)e.getSource(); - String label = choice.getText(); - - Node[] nodes = getActivatedNodes(); - final ParcelCookie parcelCookie = - (ParcelCookie)nodes[0].getCookie(ParcelCookie.class); - - File target = new File(oi.getPath(File.separator + label + - File.separator + "Scripts")); - - File langdir = new File(target, parcelCookie.getLanguage()); - - if (!langdir.exists()) { - boolean response = askIfCreateDirectory(langdir); - - if (!response) { - return; - } - } - - deploy(target); - } - }; - - user = new JMenuItem("user"); - user.addActionListener(listener); - - share = new JMenuItem("share"); - share.addActionListener(listener); - - item = new JMenuPlus(oi.getName()); - item.add(user); - item.add(share); - menu.add(item); - - menu.addSeparator(); - item = new JMenuItem(BROWSE_LABEL); - item.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - File target = getTargetFile(); - - if (target == null) - return; - - deploy(target); - } - }); - menu.add(item); - - return menu; - } - - protected int mode() { - return MODE_ONE; - } - - protected Class[] cookieClasses() { - return new Class[] { ParcelCookie.class }; - } - - protected void performAction(Node[] activatedNodes) { - // do nothing, should not happen - } - - private void deploy(final File target) { - Node[] nodes = getActivatedNodes(); - final ParcelCookie parcelCookie = - (ParcelCookie)nodes[0].getCookie(ParcelCookie.class); - - RequestProcessor.getDefault().post(new Runnable() { - public void run() { - boolean result = parcelCookie.deploy(target); - - if (result && target.isDirectory()) { - showNagDialog(); - } - } - }); - } - - private boolean askIfCreateDirectory(File directory) { - String message = directory.getAbsolutePath() + " does not exist. " + - "Do you want to create it now?"; - - NotifyDescriptor d = new NotifyDescriptor.Confirmation( - message, NotifyDescriptor.OK_CANCEL_OPTION); - TopManager.getDefault().notify(d); - - if (d.getValue() == NotifyDescriptor.CANCEL_OPTION) - return false; - - boolean result; - - try { - result = directory.mkdirs(); - } catch (SecurityException se) { - result = false; - } - - if (!result) { - String tmp = "Error creating: " + directory.getAbsolutePath(); - NotifyDescriptor d2 = new NotifyDescriptor.Message( - tmp, NotifyDescriptor.ERROR_MESSAGE); - TopManager.getDefault().notify(d2); - } - - return result; - } - - private void refreshOffice(String path) { - ClassLoader syscl = TopManager.getDefault().currentClassLoader(); - LocalOffice office = LocalOffice.create(syscl, path, 8100); - office.refreshStorage("file://" + path + "/program/../user"); - office.disconnect(); - } - - private void showNagDialog() { - String message = "If you currently have Office running you will " + - "need to click on the Tools/Scripting Add-on's/Refresh All Scripts " + - " menu item in Office so that the scripts in this parcel can be detected."; - - OfficeSettings settings = OfficeSettings.getDefault(); - - if (settings.getWarnAfterDirDeploy()) { - NagDialog warning = NagDialog.createInformationDialog( - message, "Show this message in future", true); - - warning.show(); - - if (!warning.getState()) - settings.setWarnAfterDirDeploy(false); - } - } - - private File getTargetFile() { - File target = null; - - JFileChooser chooser = new JFileChooser(); - chooser.setDialogTitle("Deploy Parcel To Office Document"); - chooser.setApproveButtonText("Deploy"); - chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); - chooser.setFileFilter(new FileFilter() { - public boolean accept(File file) { - return file.isDirectory() || - file.getName().endsWith(".sxw") || - file.getName().endsWith(".sxc") || - file.getName().endsWith(".sxd") || - file.getName().endsWith(".sxi"); - } - - public String getDescription() { - return "Office Documents"; - } - }); - - int result = chooser.showDialog(null, null); - - if (result == JFileChooser.APPROVE_OPTION) { - target = chooser.getSelectedFile(); - } - - return target; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/MountDocumentAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/MountDocumentAction.java deleted file mode 100644 index 8b22e93ef9c4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/MountDocumentAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.openide.nodes.Node; -import org.openide.util.HelpCtx; -import org.openide.util.RequestProcessor; -import org.openide.util.actions.CookieAction; - -/** - * @version 1.0 - */ -public class MountDocumentAction extends CookieAction { - public String getName() { - return "Mount Document"; //NOI18N - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - protected int mode() { - // enable duplication for as many qualifying nodes as are selected: - return CookieAction.MODE_ALL; - } - - protected java.lang.Class[] cookieClasses() { - // just the DuplicateCookie: - return new Class[] {OfficeDocumentCookie.class}; - } - - protected void performAction(final Node[] activatedNodes) { - RequestProcessor.getDefault().post(new Runnable() { - public void run() { - for (int i = 0; i < activatedNodes.length; i++) { - OfficeDocumentCookie cookie = (OfficeDocumentCookie)activatedNodes[i].getCookie( - OfficeDocumentCookie.class); - - if (cookie != null) { - cookie.mount(); - } - } - } - }); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/MountParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/MountParcelAction.java deleted file mode 100644 index 01395dc3fb7d..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/MountParcelAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.openide.nodes.Node; -import org.openide.util.HelpCtx; -import org.openide.util.RequestProcessor; -import org.openide.util.actions.CookieAction; - -/** - * @version 1.0 - */ -public class MountParcelAction extends CookieAction { - public String getName() { - return "Mount Parcel"; //NOI18N - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - protected int mode() { - // enable duplication for as many qualifying nodes as are selected: - return CookieAction.MODE_ALL; - } - - protected java.lang.Class[] cookieClasses() { - return new Class[] {ParcelCookie.class}; - } - - protected void performAction(final Node[] activatedNodes) { - RequestProcessor.getDefault().post(new Runnable() { - public void run() { - for (int i = 0; i < activatedNodes.length; i++) { - ParcelCookie mpc = (ParcelCookie)activatedNodes[i].getCookie( - ParcelCookie.class); - - if (mpc != null) { - mpc.mount(); - } - } - } - }); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentCookie.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentCookie.java deleted file mode 100644 index df57575020f4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentCookie.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.util.Enumeration; -import javax.swing.event.ChangeListener; -import org.openide.nodes.Node; - -public interface OfficeDocumentCookie extends Node.Cookie { - void mount(); - Enumeration getParcels(); - void removeParcel(String name); - - void addChangeListener(ChangeListener cl); - void removeChangeListener(ChangeListener cl); -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentSupport.java deleted file mode 100644 index c77fc63a7cbc..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/OfficeDocumentSupport.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.IOException; -import java.io.File; -import java.beans.PropertyVetoException; -import java.util.Enumeration; -import java.util.Set; -import java.util.HashSet; -import java.util.Iterator; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; - -import org.openide.ErrorManager; -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileUtil; -import org.openide.filesystems.FileChangeListener; -import org.openide.filesystems.FileEvent; -import org.openide.filesystems.FileAttributeEvent; -import org.openide.filesystems.FileRenameEvent; -import org.openide.cookies.OpenCookie; - -import org.openoffice.idesupport.OfficeDocument; - -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.netbeans.modules.office.loader.OfficeDocumentDataObject; -import org.openoffice.netbeans.modules.office.utils.ZipMounter; -import org.openoffice.netbeans.modules.office.utils.ManifestParser; - -public class OfficeDocumentSupport implements OfficeDocumentCookie, OpenCookie, - FileChangeListener { - protected OfficeDocumentDataObject dataObj; - private boolean isMounted = false; - private OfficeDocument document; - private Set listeners; - - public OfficeDocumentSupport(OfficeDocumentDataObject dataObj) { - this.dataObj = dataObj; - FileObject fo = dataObj.getPrimaryFile(); - - try { - this.document = new OfficeDocument(FileUtil.toFile(fo)); - } catch (Exception e) { - e.printStackTrace(); - } - - fo.addFileChangeListener(this); - } - - public void mount() { - File file = FileUtil.toFile(dataObj.getPrimaryFile()); - - try { - ZipMounter.getZipMounter().mountZipFile(file); - isMounted = true; - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - } catch (PropertyVetoException pve) { - ErrorManager.getDefault().notify(pve); - } - } - - public void open() { - File file = FileUtil.toFile(dataObj.getPrimaryFile()); - - OfficeSettings settings = OfficeSettings.getDefault(); - File soffice = new File(settings.getOfficeDirectory().getPath( - File.separator + "soffice")); - - try { - Process p = Runtime.getRuntime().exec(new String[] { - soffice.getAbsolutePath(), file.getAbsolutePath() - }); - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - } - } - - public Enumeration getParcels() { - return document.getParcels(); - } - - public void removeParcel(String name) { - document.removeParcel(name); - dataObj.getPrimaryFile().refresh(true); - } - - public void addChangeListener(ChangeListener cl) { - if (listeners == null) - listeners = new HashSet(); - - listeners.add(cl); - } - - public void removeChangeListener(ChangeListener cl) { - if (listeners == null) - return; - - listeners.remove(cl); - } - - public void fileChanged(FileEvent fe) { - if (listeners != null) { - Iterator iter = listeners.iterator(); - - while (iter.hasNext()) - ((ChangeListener)iter.next()).stateChanged(new ChangeEvent(this)); - } - } - - public void fileAttributeChanged(FileAttributeEvent fe) {} - public void fileDataCreated(FileEvent fe) {} - public void fileDeleted(FileEvent fe) {} - public void fileFolderCreated(FileEvent fe) {} - public void fileRenamed(FileRenameEvent fe) {} -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelCookie.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelCookie.java deleted file mode 100644 index 1c782ae6bf22..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelCookie.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.File; -import org.openide.nodes.Node; - -public interface ParcelCookie extends Node.Cookie { - File getFile(); - - String getLanguage(); - - void mount(); - - boolean deploy(File target); -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java deleted file mode 100644 index c4378ceff24d..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.IOException; - -import org.openide.cookies.*; -import org.openide.filesystems.FileLock; -import org.openide.filesystems.FileObject; -import org.openide.loaders.DataObject; -import org.openide.text.DataEditorSupport; -import org.openide.windows.CloneableOpenSupport; - -import org.openoffice.netbeans.modules.office.loader.ParcelDescriptorDataObject; - -/** Support for editing a data object as text. - */ -// Replace OpenCookie with EditCookie or maybe ViewCookie as desired: -public class ParcelDescriptorEditorSupport extends DataEditorSupport implements - EditorCookie, OpenCookie, CloseCookie, PrintCookie { - - /** Create a new editor support. - * @param obj the data object whose primary file will be edited as text - */ - public ParcelDescriptorEditorSupport(ParcelDescriptorDataObject obj) { - super(obj, new ParcelDescriptorEnv(obj)); - // Set a MIME type as needed, e.g.: - setMIMEType("text/xml"); - } - - /** Called when the document is modified. - * Here, adding a save cookie to the object and marking it modified. - * @return true if the modification is acceptable - */ - protected boolean notifyModified() { - if (!super.notifyModified()) { - return false; - } - - ParcelDescriptorDataObject obj = (ParcelDescriptorDataObject)getDataObject(); - - if (obj.getCookie(SaveCookie.class) == null) { - obj.setModified(true); - // You must implement this method on the object: - obj.addSaveCookie(new Save()); - } - - return true; - } - - /** Called when the document becomes unmodified. - * Here, removing the save cookie from the object and marking it unmodified. - */ - protected void notifyUnmodified() { - ParcelDescriptorDataObject obj = (ParcelDescriptorDataObject)getDataObject(); - SaveCookie save = (SaveCookie)obj.getCookie(SaveCookie.class); - - if (save != null) { - // You must implement this method on the object: - obj.removeSaveCookie(save); - obj.setModified(false); - } - - super.notifyUnmodified(); - } - - /** A save cookie to use for the editor support. - * When saved, saves the document to disk and marks the object unmodified. - */ - private class Save implements SaveCookie { - public void save() throws IOException { - saveDocument(); - getDataObject().setModified(false); - } - } - - /** A description of the binding between the editor support and the object. - * Note this may be serialized as part of the window system and so - * should be static, and use the transient modifier where needed. - */ - private static class ParcelDescriptorEnv extends DataEditorSupport.Env { - - /** Create a new environment based on the data object. - * @param obj the data object to edit - */ - public ParcelDescriptorEnv(ParcelDescriptorDataObject obj) { - super(obj); - } - - /** Get the file to edit. - * @return the primary file normally - */ - protected FileObject getFile() { - return getDataObject().getPrimaryFile(); - } - - /** Lock the file to edit. - * Should be taken from the file entry if possible, helpful during - * e.g. deletion of the file. - * @return a lock on the primary file normally - * @throws IOException if the lock could not be taken - */ - protected FileLock takeLock() throws IOException { - return ((ParcelDescriptorDataObject) - getDataObject()).getPrimaryEntry().takeLock(); - } - - /** Find the editor support this environment represents. - * Note that we have to look it up, as keeping a direct - * reference would not permit this environment to be serialized. - * @return the editor support - */ - public CloneableOpenSupport findCloneableOpenSupport() { - return (ParcelDescriptorEditorSupport)getDataObject().getCookie( - ParcelDescriptorEditorSupport.class); - } - - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserCookie.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserCookie.java deleted file mode 100644 index 0e7e4226d657..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserCookie.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.w3c.dom.NodeList; -import javax.swing.event.ChangeListener; -import org.openide.nodes.Node; - -public interface ParcelDescriptorParserCookie extends Node.Cookie { - // should return a NodeList of org.w3c.dom.Element - NodeList getScriptElements(); - - void addChangeListener(ChangeListener cl); - - void removeChangeListener(ChangeListener cl); -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserSupport.java deleted file mode 100644 index f3f105679677..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorParserSupport.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.*; -import java.util.*; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import org.openide.filesystems.*; -import org.openide.xml.XMLUtil; - -public class ParcelDescriptorParserSupport - implements ParcelDescriptorParserCookie, FileChangeListener { - private FileObject fo; - private Document document; - private Set listeners; - - public ParcelDescriptorParserSupport(FileObject fo) { - this.fo = fo; - fo.addFileChangeListener(this); - } - - private synchronized void parseFile() { - File file = FileUtil.toFile(fo); - InputSource is; - - try { - is = new InputSource(new FileInputStream(file)); - } catch (FileNotFoundException fnfe) { - System.out.println("Couldn't find file: " + file.getName()); - return; - } - - document = null; - - try { - document = XMLUtil.parse(is, false, false, null, null); - } catch (IOException ioe) { - System.out.println("IO Error parsing file: " + file.getName()); - } catch (SAXException se) { - System.out.println("Sax Error parsing file: " + file.getName()); - } - } - - public synchronized NodeList getScriptElements() { - if (document == null) - parseFile(); - - if (document != null) - return document.getElementsByTagName("script"); - - return null; - } - - public void addChangeListener(ChangeListener cl) { - if (listeners == null) - listeners = new HashSet(); - - listeners.add(cl); - } - - public void removeChangeListener(ChangeListener cl) { - if (listeners == null) - return; - - listeners.remove(cl); - } - - public void fileChanged(FileEvent fe) { - parseFile(); - - if (listeners != null) { - Iterator iter = listeners.iterator(); - - while (iter.hasNext()) - ((ChangeListener)iter.next()).stateChanged(new ChangeEvent(this)); - } - } - - public void fileAttributeChanged(FileAttributeEvent fe) {} - public void fileDataCreated(FileEvent fe) {} - public void fileDeleted(FileEvent fe) {} - public void fileFolderCreated(FileEvent fe) {} - public void fileRenamed(FileRenameEvent fe) {} -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderCookie.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderCookie.java deleted file mode 100644 index 6a17ee13ab31..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderCookie.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import org.openide.nodes.Node; - -public interface ParcelFolderCookie extends Node.Cookie { - void generate(); - - boolean configure(); - - void setClasspath(String value); - String getClasspath(); - - String getLanguage(); -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderSupport.java deleted file mode 100644 index ce0ac563b0a5..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelFolderSupport.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.util.Vector; -import java.util.StringTokenizer; - -import java.io.*; -import java.beans.PropertyVetoException; -import java.awt.Dialog; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import org.openide.TopManager; -import org.openide.DialogDescriptor; -import org.openide.ErrorManager; -import org.openide.xml.XMLUtil; -import org.openide.execution.NbClassPath; - -import org.openide.cookies.OpenCookie; -import org.openide.loaders.DataObject; -import org.openide.loaders.DataNode; - -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.JarFileSystem; -import org.openide.filesystems.FileUtil; -import org.openide.filesystems.Repository; - -import org.openide.nodes.*; -import org.openide.windows.OutputWriter; - -import org.openoffice.netbeans.modules.office.loader.ParcelFolder; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.netbeans.modules.office.utils.ManifestParser; - -import com.sun.star.script.framework.container.ParcelDescriptor; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.idesupport.filter.FileFilter; -import org.openoffice.idesupport.ui.ConfigurePanel; - -public class ParcelFolderSupport implements ParcelFolderCookie { - protected ParcelFolder parcelFolder; - private ConfigurePanel configuror = null; - - public ParcelFolderSupport(ParcelFolder parcelFolder) { - this.parcelFolder = parcelFolder; - } - - public String getLanguage() { - ParcelDescriptor descriptor = getParcelDescriptor(); - - if (descriptor == null) { - return ""; - } else { - return descriptor.getLanguage(); - } - } - - public String getClasspath() { - ParcelDescriptor descriptor = getParcelDescriptor(); - - if (descriptor == null) { - return ""; - } else { - return descriptor.getLanguageProperty("classpath"); - } - } - - public void setClasspath(String value) { - ParcelDescriptor descriptor = getParcelDescriptor(); - - if (descriptor != null) { - descriptor.setLanguageProperty("classpath", value); - - try { - descriptor.write(); - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - } - } - } - - private ParcelDescriptor getParcelDescriptor() { - FileObject primary = parcelFolder.getPrimaryFile(); - - File contents = FileUtil.toFile( - primary.getFileObject(ParcelZipper.CONTENTS_DIRNAME)); - - return ParcelDescriptor.getParcelDescriptor(contents); - } - - public void generate() { - ParcelFolder.ParcelFolderNode node = - (ParcelFolder.ParcelFolderNode)parcelFolder.getNodeDelegate(); - - FileObject parcelBase = parcelFolder.getPrimaryFile(); - FileObject contentsBase = - parcelBase.getFileObject(ParcelZipper.CONTENTS_DIRNAME); - - File parcelDir = FileUtil.toFile(parcelBase); - File contentsDir = FileUtil.toFile(contentsBase); - - // The Location property is not displayed so just - // use the Parcel Recipe directory as the target directory - File targetDir = FileUtil.toFile(parcelFolder.getPrimaryFile()); - File targetfile = new File(targetDir, File.separator + - parcelBase.getName() + "." + ParcelZipper.PARCEL_EXTENSION); - - boolean proceed = configure(); - - if (!proceed) { - return; - } - - final OutputWriter out = - ParcelSupport.getOutputWindowWriter(parcelDir.getName() + " (generating)"); - - try { - out.println("Generating: " + parcelDir.getName(), null); - ParcelZipper.getParcelZipper().zipParcel(contentsDir, targetfile, - node.getFileFilter()); - out.println("\nGENERATION SUCCESSFUL."); - out.println("\nRight click on the generated parcel to deploy it"); - - if (targetDir.equals(parcelDir)) { - parcelBase.refresh(true); - } - } catch (IOException ioe) { - out.println("GENERATION FAILED: reason: " + ioe.getClass().getName() + ": " + - ioe.getMessage()); - } finally { - if (out != null) { - out.close(); - } - } - } - - public boolean configure() { - - FileObject primary = parcelFolder.getPrimaryFile(); - - File contents = FileUtil.toFile( - primary.getFileObject(ParcelZipper.CONTENTS_DIRNAME)); - - ArrayList<String> classpath = getConfigureClasspath(); - classpath.add(contents.getAbsolutePath()); - - try { - ParcelDescriptor descriptor = getParcelDescriptor(); - - if (descriptor == null) { - descriptor = ParcelDescriptor.createParcelDescriptor(contents); - } - - if (configuror == null) { - configuror = new ConfigurePanel(contents.getAbsolutePath(), - classpath, descriptor); - } else { - configuror.reload(contents.getAbsolutePath(), classpath, - descriptor); - } - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - return false; - } - - DialogDescriptor dd = new DialogDescriptor(configuror, - ConfigurePanel.DIALOG_TITLE); - - Dialog dialog = TopManager.getDefault().createDialog(dd); - dialog.show(); - - if (dd.getValue() == DialogDescriptor.OK_OPTION) { - try { - ParcelDescriptor descriptor = configuror.getConfiguration(); - descriptor.write(); - } catch (Exception e) { - ErrorManager.getDefault().notify(e); - } - } else { - return false; - } - - return true; - } - - private ArrayList<String> getConfigureClasspath() { - ArrayList<String> result = new ArrayList<String>(); - - String classpath = NbClassPath.createRepositoryPath().getClassPath(); - - if (System.getProperty("os.name").startsWith("Windows")) { - // under windows path is enclosed by quotes - // e.g. C:\path1;d:\path2 would appear as - // "C:\path1;d:\path2" therefore for us - // we need to remove 1 character at either end of the - // classpath returned from "createRepositoryPath().getClassPath()" - - if (classpath.startsWith("\"") && classpath.endsWith("\"")) { - StringBuffer buff = new StringBuffer(classpath); - buff.delete(0, 1); - buff.delete(buff.length() - 1, buff.length()); - classpath = buff.toString(); - } - } - - StringTokenizer tokens = new StringTokenizer(classpath, File.pathSeparator); - - while (tokens.hasMoreTokens()) - result.addElement(tokens.nextToken()); - - OfficeSettings settings = OfficeSettings.getDefault(); - File classesDir = new File(settings.getOfficeDirectory().getPath( - File.separator + "program" + File.separator + "classes")); - File[] jarfiles = classesDir.listFiles(); - - for (int i = 0; i < jarfiles.length; i++) - result.addElement(jarfiles[i].getAbsolutePath()); - - return result; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java deleted file mode 100644 index 381be44ccadb..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.actions; - -import java.io.File; -import java.io.IOException; -import java.beans.PropertyVetoException; -import java.util.Enumeration; -import java.util.Calendar; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.windows.OutputWriter; -import org.openide.windows.InputOutput; - -import org.openide.ErrorManager; -import org.openide.nodes.Node; -import org.openide.filesystems.Repository; -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileUtil; -import org.openide.filesystems.FileEvent; - -import org.openoffice.idesupport.zip.ParcelZipper; - -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.netbeans.modules.office.utils.NagDialog; -import org.openoffice.netbeans.modules.office.utils.ZipMounter; -import org.openoffice.netbeans.modules.office.utils.ManifestParser; - -public class ParcelSupport implements ParcelCookie { - private FileObject fo; - private ParcelZipper zipper = ParcelZipper.getParcelZipper(); - private String language = null; - - public ParcelSupport(FileObject fo) { - this.fo = fo; - } - - public File getFile() { - return FileUtil.toFile(fo); - } - - public String getLanguage() { - if (language == null) { - try { - language = zipper.getParcelLanguage(getFile()); - } catch (IOException ioe) { - return null; - } - } - - return language; - } - - public void mount() { - File parcel = FileUtil.toFile(fo); - - if (parcel != null) { - try { - ZipMounter.getZipMounter().mountZipFile(parcel); - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - } catch (PropertyVetoException pve) { - ErrorManager.getDefault().notify(pve); - } - } - } - - public boolean deploy(File target) { - File source = FileUtil.toFile(fo); - - if (!target.isDirectory()) { - OfficeSettings settings = OfficeSettings.getDefault(); - String message = "If you already have this document open in " + - "Office, please close it before continuing. Click OK to " + - "continue deployment."; - - if (settings.getWarnBeforeDocDeploy()) { - NagDialog warning = NagDialog.createConfirmationDialog( - message, "Show this message in future", true); - - boolean result = warning.show(); - - if (!warning.getState()) - settings.setWarnBeforeDocDeploy(false); - - if (!result) - return false; - } - } - - OutputWriter out = - getOutputWindowWriter(fo.getName() + " (deploying)"); - - try { - if (!zipper.isOverwriteNeeded(source, target)) - if (!promptForOverwrite(source, target)) - return false; - } catch (IOException ioe) { - out.println("DEPLOYMENT FAILED: reason: " + - ioe.getClass().getName() + ": " + ioe.getMessage()); - return false; - } - - try { - out.println("Deploying: " + fo.getName() + - "\nTo: " + target.getAbsolutePath(), null); - - zipper.deployParcel(source, target); - - out.println("\nDEPLOYMENT SUCCESSFUL."); - - FileObject[] fileobjs = FileUtil.fromFile(target); - - if (fileobjs != null) { - for (int i = 0; i < fileobjs.length; i++) - fileobjs[i].refresh(true); - } - } catch (IOException ioe) { - out.println("DEPLOYMENT FAILED: reason: " + - ioe.getClass().getName() + ": " + ioe.getMessage()); - return false; - } finally { - if (out != null) - out.close(); - } - - return true; - } - - public static OutputWriter getOutputWindowWriter(String title) { - InputOutput io = TopManager.getDefault().getIO(title, false); - io.setFocusTaken(true); - io.setOutputVisible(true); - - OutputWriter out = io.getOut(); - - try { - out.reset(); - } catch (IOException e) { - e.printStackTrace(System.err); - } - - out.println(Calendar.getInstance().getTime() + ":\n"); - return out; - } - - private boolean promptForOverwrite(File source, File target) { - String message = source.getName() + " has already been deployed " + - "to this target. Do you wish to overwrite it?"; - - NotifyDescriptor d = new NotifyDescriptor.Confirmation( - message, NotifyDescriptor.OK_CANCEL_OPTION); - TopManager.getDefault().notify(d); - - return (d.getValue() != NotifyDescriptor.CANCEL_OPTION); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle.properties deleted file mode 100644 index f44811a494b0..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# -# Filesystems API -# {0} - root path -# x-no-translate -LAB_invalid_file_system=invalid OpenOffice.org document {0} -# {0} - root path -LAB_valid_file_system={0} -# {0} - root path -EXC_root_dir_does_not_exist=Root directory {0} does not exist. -# {0} - original name before annotation -LBL_modified_files={0} <somehow annotated> -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_file_could_not_be_locked={2} could not be locked; it did not exist or was not writable. -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_create_empty_name=Cannot create a file with an empty name. -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_folder_already_exists=Folder {2} already exists. -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_folder_could_not_be_created=Folder {2} could not be created. -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_file_could_not_be_created=File {2} could not be created. -# {0} - old file name and extension -# {1} - new file name and extension -# {2} - display name of filesystem -# {3} - full path to old file -# {4} - full path to new file -EXC_file_could_not_be_renamed=File {3} could not be renamed to {4}. -# {0} - file name and extension -# {1} - display name of filesystem -# {2} - full path to file -EXC_file_could_not_be_deleted=File {2} could not be deleted. -PROP_readOnly=Read Only -HINT_readOnly=Whether this filesystem should be writable, or read-only. -PROP_document=OpenOffice.org Document -HINT_document=OpenOffice.org Document (mount point) of this filesystem. diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle_en_US.properties b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle_en_US.properties deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/Bundle_en_US.properties +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java deleted file mode 100644 index 6081445d258a..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java +++ /dev/null @@ -1,1182 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.filesystem; - -import java.beans.*; -import java.io.*; -import java.util.*; -import java.util.zip.*; - -import org.openide.ErrorManager; -import org.openide.filesystems.*; -import org.openide.filesystems.FileSystem; // override java.io.FileSystem -import org.openide.util.NbBundle; - -// ISSUES: -// - This FS saves (updates) the file on 'setDocument' or 'removeNotify'. -// It has to let the user to decide to update or not. - -// TODOS: -// - 'Update' action on the mounted document which saves all recent modifications. -// - To introduce 'scope' editable property to control editable portion of -// the mounted document. -// - Acceptable document type identification before mount. - -/** - * OpenOffice.org Document filesystem. - */ -public class OpenOfficeDocFileSystem - extends AbstractFileSystem { - public static final String SCRIPTS_ROOT = "Scripts"; // must be a folder - public static final String SEPARATOR = "/"; // zip file separator - - private static final int OS_UNKNOWN = 0; - private static final int OS_UNIX = 1; - private static final int OS_MACOS = 2; - private static final int OS_WINDOWS = 3; - - private static final int REFRESH_OFF = -1; // -1 is desabled - private static final int REFRESH_TIME = REFRESH_OFF; // (mS) - private static final String TMP_FILE_PREF = "sx_"; - private static final String TMP_FILE_SUFX = ".sxx"; - - private transient Map cache; // filesystem cache - private transient File docFile; // OpenOffice document - private transient ZipFile zipFile; - - private static transient int osType; // type of OS - - private transient ChildrenStrategy childrenStrategy; - private transient EditableStrategy editableStrategy; - - private transient boolean isModified; // true if an entry has been removed - - /** - * Static constructor. - */ - static { - // Identify the type of OS - String osname = System.getProperty("os.name"); - - if (osname.startsWith("Mac OS")) - osType = OS_MACOS; - else if (osname.startsWith("Windows")) - osType = OS_WINDOWS; - else - osType = OS_UNIX; - } - - /** - * Default constructor. Initializes new OpenOffice filesystem. - */ - public OpenOfficeDocFileSystem() { - // Create the filesystem cache - cache = new HashMap(); - - // Initialize strategies - editableStrategy = new EditableStrategy(SCRIPTS_ROOT); - childrenStrategy = new ChildrenStrategy(); - - // Create and use implementations of filesystem functionality: - info = new InfoImpl(); - change = new ChangeImpl(); - - // Handle filesystem.attributes files normally: - DefaultAttributes defattr = new DefaultAttributes( - info, change, new ListImpl()); - - // Handle filesystem.attributes files normally + adds virtual attribute - // "java.io.File" that is used in conversion routines FileUtil.toFile and - // FileUtil.fromFile - //defattr = new InnerAttrs(this, info, change, new ListImpl()); - // (Otherwise set attr to a special implementation, and use ListImpl for list.) - attr = defattr; - list = defattr; - - setRefreshTime(REFRESH_OFF); - } - - /** - * Constructor. Initializes new OpenOffice filesystem with FS capability. - */ - public OpenOfficeDocFileSystem(FileSystemCapability cap) { - this(); - setCapability(cap); - } - - /** - * Provides unique signature of an instance of the filesystem. - * NOTE: The scope is not a part of the signature so it is impossible - * to mount the same archive more than once. - */ - public static String computeSystemName(File file) { - return OpenOfficeDocFileSystem.class.getName() + "[" + file + "]"; - } - - // ----------- PROPERTIES -------------- - - /** - * Provides the 'human readable' name of the instance of the filesystem. - */ - public String getDisplayName() { - if (!isValid()) - return NbBundle.getMessage(OpenOfficeDocFileSystem.class, - "LAB_invalid_file_system", ((docFile != null) ? docFile.toString() : "")); - else - return NbBundle.getMessage(OpenOfficeDocFileSystem.class, - "LAB_valid_file_system", docFile.toString()); - } - - /** - * Retrieves the 'document' property. - */ - public File getDocument() { - return docFile; - } - - /** - * Sets the 'document' property. - */ - // Bean setter. Changing the OpenOffice document (or in general, the identity - // of the root file object) should cause everything using this filesystem - // to refresh. The system name must change and refreshRoot should be used - // to ensure that everything is correctly updated. - - public synchronized void setDocument(File file) - throws java.beans.PropertyVetoException, java.io.IOException { - System.out.println("OpenOfficeDocFileSystem.setDocument: file=\"" + - file.toString() + "\""); - - if (!file.exists() || !file.isFile()) { - IOException ioe = new IOException( - file.toString() + " does not exist"); - ErrorManager.getDefault().annotate(ioe, NbBundle.getMessage( - OpenOfficeDocFileSystem.class, "EXC_root_dir_does_not_exist", - file.toString())); - throw ioe; - } - - // update the document - try { - updateDocument(); - } catch (IOException ioe) { - // cannot save all!!! - System.out.println("*** OpenOfficeDocFileSystem.setDocument:"); - System.out.println(" file: " + ((docFile != null) ? docFile.toString() : - "")); - System.out.println(" exception: " + ioe.getMessage()); - } - - // new document type verification!!! - closeDocument(); - - // open a new document - try { - openDocument(file); - firePropertyChange(PROP_ROOT, null, refreshRoot()); - setRefreshTime(REFRESH_TIME); - } catch (IOException ioe) { - // cannot open a new document!!! - System.out.println("*** OpenOfficeDocFileSystem.setDocument:"); - System.out.println(" file: " + ((file != null) ? file.toString() : "")); - System.out.println(" exception: " + ioe.getMessage()); - } - } - - /** - * Retrieves 'readonly' property. - * NOTE: The portion of the mounted document available to the user is - * always editable. - */ - public boolean isReadOnly() { - return false; - } - - /** - * Sets 'readonly' property. - * NOTE: The portion of the mounted document available to the user is - * always editable. - */ - public void setReadOnly(boolean flag) { - // sorry! it is not supported. - } - - // ----------- SPECIAL CAPABILITIES -------------- - - /** - * Participates in the environment configuration. - * This is how you can affect the classpath for execution, compilation, etc. - */ - public void prepareEnvironment(FileSystem.Environment environment) { - // BUG: the compiller cannot access files within the OpenOffice document. - //environment.addClassPath(docFile.toString()); - } - - /* ----------------------------------------------------------- - * Affect the name and icon of files on this filesystem according to their - * "status", e.g. version-control modification-commit state: - /* - private class StatusImpl implements Status { - public Image annotateIcon(Image icon, int iconType, Set files) { - // You may first modify it, e.g. by adding a check mark to the icon - // if that makes sense for this file or group of files. - return icon; - } - public String annotateName(String name, Set files) { - // E.g. add some sort of suffix to the name if some of the - // files are modified but not backed up or committed somehow: - if (theseFilesAreModified(files)) - return NbBundle.getMessage(OpenOfficeDocFileSystem.class, "LBL_modified_files", name); - else - return name; - } - } - - private transient Status status; - - public Status getStatus() { - if (status == null) { - status = new StatusImpl(); - } - return status; - } - // And use fireFileStatusChanged whenever you know something has changed. - */ - - /* - // Filesystem-specific actions, such as version-control operations. - // The actions should typically be CookieActions looking for DataObject - // cookies, where the object's primary file is on this type of filesystem. - public SystemAction[] getActions() { - // ------>>>> UPDATE OPENOFFICE DOCUMENT <<<<------ - return new SystemAction[] { - SystemAction.get(SomeAction.class), - null, // separator - SystemAction.get(SomeOtherAction.class) - }; - } - */ - - /** - * Notifies this filesystem that it has been removed from the repository. - * Concrete filesystem implementations could perform clean-up here. - * The default implementation does nothing. - * <p>Note that this method is <em>advisory</em> and serves as an optimization - * to avoid retaining resources for too long etc. Filesystems should maintain correct - * semantics regardless of whether and when this method is called. - */ - public void removeNotify() { - setRefreshTime(REFRESH_OFF); // disable refresh - - // update the document - try { - updateDocument(); - } catch (IOException ioe) { - // cannot save all!!! - System.out.println("*** OpenOfficeDocFileSystem.removeNotify:"); - System.out.println(" exception: " + ioe.getMessage()); - } - - closeDocument(); - super.removeNotify(); - } - - /* - * Opens (mounts) an OpenOffice document. - */ - private void openDocument(File file) - throws IOException, PropertyVetoException { - synchronized (cache) { - setSystemName(computeSystemName(file)); - docFile = file; - zipFile = new ZipFile(docFile); - cacheDocument(zipFile.entries(), editableStrategy); - isModified = false; - } // synchronized - } - - /* - * Closes the document and cleans up the cache. - */ - private void closeDocument() { - synchronized (cache) { - // if a document mounted - close it - if (docFile != null) { - // close the document archive - if (zipFile != null) { - try { - zipFile.close(); - } catch (IOException ioe) { - // sorry! we can do nothing about it. - } - } - - zipFile = null; - // clean up cache - scanDocument(new CleanStrategy()); - docFile = null; - isModified = false; - } - } // synchronized - } - - /* - * Creates a document cache. - */ - private void cacheDocument(Enumeration entries, Strategy editables) { - Entry cacheEntry; - ZipEntry archEntry; - - synchronized (cache) { - cache.clear(); - // root folder - cacheEntry = new ReadWriteEntry(null); - cache.put(cacheEntry.getName(), cacheEntry); - - // the rest of items - while (entries.hasMoreElements()) { - archEntry = (ZipEntry)entries.nextElement(); - cacheEntry = new Entry(archEntry); - - if (editables.evaluate(cacheEntry)) - cacheEntry = new ReadWriteEntry(archEntry); - - cache.put(cacheEntry.getName(), cacheEntry); - } - } // synchronized - } - - /* - * Updates the document. - */ - private void updateDocument() - throws IOException { - if (docFile == null) - return; - - synchronized (cache) { - ModifiedStrategy modifiedStrategy = new ModifiedStrategy(); - scanDocument(modifiedStrategy); - - if (isModified || modifiedStrategy.isModified()) { - File tmpFile = null; - - try { - // create updated document - tmpFile = File.createTempFile( - TMP_FILE_PREF, TMP_FILE_SUFX, docFile.getParentFile()); - saveDocument(tmpFile); - } catch (IOException ioe) { - if (tmpFile != null) - tmpFile.delete(); - - throw ioe; - } - - // close the document archive - if (zipFile != null) { - try { - zipFile.close(); - } catch (IOException ioe) { - } - } - - zipFile = null; - // create the document and backup - File newFile = new File(docFile.getParentFile() + File.separator + - "~" + docFile.getName()); - - if (newFile.exists()) - newFile.delete(); // delete old backup - - docFile.renameTo(newFile); - tmpFile.renameTo(docFile); - // open the document archive - zipFile = new ZipFile(docFile); - } - - isModified = false; - } // synchronized - } - - /* - * Saves the document in a new archive. - */ - private void saveDocument(File file) - throws IOException { - synchronized (cache) { - SaveStrategy saver = new SaveStrategy(file); - scanDocument(saver); - saver.close(); - } // synchronized - } - - /* - * Provides each individual entry in the cached document to an apraiser. - */ - private void scanDocument(Strategy strategy) { - synchronized (cache) { - Iterator itr = cache.values().iterator(); - - while (itr.hasNext()) { - strategy.evaluate((Entry)itr.next()); - } - } // synchronized - } - - /* - * Retrieves or creates a file. - */ - private Entry getFileEntry(String name) - throws IOException { - Entry cEntry = null; - - synchronized (cache) { - cEntry = (Entry)cache.get(name); - - if (cEntry == null) { - // create a new file - ZipEntry zEntry = new ZipEntry(name); - zEntry.setTime(new Date().getTime()); - cEntry = new Entry(zEntry); - - if (!editableStrategy.evaluate(cEntry)) { - throw new IOException( - "cannot create/edit readonly file"); // I18N - } - - cEntry = new ReadWriteEntry(zEntry); - cache.put(cEntry.getName(), cEntry); - isModified = true; - } - } // synchronized - - return cEntry; - } - - /* - * Retrieves or creates a folder. - */ - private Entry getFolderEntry(String name) - throws IOException { - Entry cEntry = null; - - synchronized (cache) { - cEntry = (Entry)cache.get(name); - - if (cEntry == null) { - // create a new folder - ZipEntry zEntry = new ZipEntry(name + SEPARATOR); - zEntry.setMethod(ZipEntry.STORED); - zEntry.setSize(0); - CRC32 crc = new CRC32(); - zEntry.setCrc(crc.getValue()); - zEntry.setTime(new Date().getTime()); - cEntry = new Entry(zEntry); - - if (!editableStrategy.evaluate(cEntry)) { - throw new IOException( - "cannot create folder"); // I18N - } - - cEntry = new ReadWriteEntry(zEntry); - cEntry.getOutputStream(); // sets up modified flag - cache.put(cEntry.getName(), cEntry); - isModified = true; - } else { - if (!cEntry.isFolder()) - cEntry = null; - } - } // synchronized - - return cEntry; - } - - /* - * Converts the name to ZIP file name. - * Removes the leading file separator if there is one. - * This is WORKAROUND of the BUG in AbstractFileObject: - * While AbstractFileObject reprecents the root of the filesystem it uses - * the absolute path (the path starts with '/'). It is inconsistent with - * the rest of the code. - * WORKAROUND: we have to strip leading '/' if it is in the name. - */ - private static String zipName(String name) { - String zname = ((name.startsWith(File.separator)) ? - name.substring(File.separator.length()) : name); - - switch (osType) { - case OS_MACOS: - zname = zname.replace(':', '/'); // ':' by '/' - break; - - case OS_WINDOWS: - zname = zname.replace((char)0x5c, '/'); // '\' by '/' - break; - - default: - break; - } - - return zname; - } - - // ----------- IMPLEMENTATIONS OF ABSTRACT FUNCTIONALITY ---------- - - /* ----------------------------------------------------------- - * Information about files and operations on the contents which do - * not affect the file's presence or name. - */ - private class InfoImpl - implements Info { - public boolean folder(String name) { - synchronized (cache) { - String zname = zipName(name); - Entry entry = (Entry)cache.get(zname); - - if (entry != null) - return entry.isFolder(); - - // logical zip file entry - childrenStrategy.setParent(zname); - scanDocument(childrenStrategy); - return (childrenStrategy.countChildren() > 0); - } - } - - public Date lastModified(String name) { - synchronized (cache) { - Entry entry = (Entry)cache.get(zipName(name)); - return new Date((entry != null) ? entry.getTime() : 0L); - } - } - - public boolean readOnly(String name) { - synchronized (cache) { - Entry entry = (Entry)cache.get(zipName(name)); - return entry && entry.isReadOnly(); - } - } - - public String mimeType(String name) { - // Unless you have some special means of determining MIME type - // (e.g. HTTP headers), ask IDE to use its normal heuristics: - // the MIME resolver pool and then file extensions, or if nothing - // matches, just content/unknown. - return null; - } - - public long size(String name) { - synchronized (cache) { - Entry entry = (Entry)cache.get(zipName(name)); - return (entry != null) ? entry.getSize() : 0; - } // synchronized - } - - public InputStream inputStream(String name) - throws FileNotFoundException { - synchronized (cache) { - Entry entry = (Entry)cache.get(zipName(name)); - return (entry != null) ? entry.getInputStream() : null; - } // synchronized - } - - public OutputStream outputStream(String name) - throws IOException { - return getFileEntry(zipName(name)).getOutputStream(); - } - - // AbstractFileSystem handles locking the file to the rest of the IDE. - // This only means that you should define how the file should be locked - // to the outside world--perhaps it does not need to be. - public void lock(String name) - throws IOException { - /* - File file = getFile(name); - if (file.exists() == true && file.canWrite() == false) { - IOException ioe = new IOException("file " + file + - " could not be locked"); - ErrorManager.getDefault().annotate(ioe, NbBundle.getMessage( - OpenOfficeDocFileSystem.class, "EXC_file_could_not_be_locked", - file.getName(), getDisplayName(), file.getPath())); - throw ioe; - } - */ - } - - public void unlock(String name) { - // Nothing special needed to unlock a file to the outside world. - } - - public void markUnimportant(String name) { - // Do nothing special. Version-control systems may use this to mark - // certain files (e.g. *.class) as not needing to be stored in the VCS - // while others (source files) are by default important. - } - - } - - /* ----------------------------------------------------------- - * Operations that change the available files. - */ - private class ChangeImpl - implements Change { - public void createFolder(String name) - throws IOException { - synchronized (cache) { - String zname = zipName(name); - - if (cache.get(zname) != null) { - throw new IOException( - "cannot create new folder: " + name); // I18N - } - - getFolderEntry(zname); - } // synchronized - } - - public void createData(String name) - throws IOException { - synchronized (cache) { - String zname = zipName(name); - - if (cache.get(zname) != null) { - throw new IOException( - "cannot create new data: " + name); // I18N - } - - OutputStream os = getFileEntry(zname).getOutputStream(); - os.close(); - } // synchronized - } - - public void rename(String oldName, String newName) - throws IOException { - String oname = zipName(oldName); - String nname = zipName(newName); - - if ((oname.length() == 0) || (nname.length() == 0)) { - throw new IOException( - "cannot move or rename the root folder"); // I18N - } - - synchronized (cache) { - if (cache.get(nname) != null) { - throw new IOException( - "target file/folder " + newName + " exists"); // I18N - } - - Entry entry = (Entry)cache.get(oname); - - if (entry == null) { - throw new IOException( - "there is no such a file/folder " + oldName); // I18N - } - - if (entry.isReadOnly()) { - throw new IOException( - "file/folder " + oldName + " is readonly"); // I18N - } - - entry.rename(nname); - - if (!editableStrategy.evaluate(entry)) { - entry.rename(oname); - throw new IOException( - "cannot create file/folder"); // I18N - } - - cache.remove(oname); - cache.put(entry.getName(), entry); - } // synchronized - } - - public void delete(String name) - throws IOException { - String zname = zipName(name); - - if (zname.length() == 0) { - throw new IOException( - "cannot delete the root folder"); // I18N - } - - synchronized (cache) { - Entry entry = (Entry)cache.remove(zname); - - if (entry != null) { - // BUG: this is the design bug. Cache has to - // remember that the entry was removed. - isModified = true; - entry.clean(); - } - } // synchronized - } - } - - /* ----------------------------------------------------------- - * Operation which provides the directory structure. - */ - private class ListImpl - implements List { - public String[] children(String name) { - String[] children = null; - - synchronized (cache) { - String zname = zipName(name); - Entry entry = (Entry)cache.get(zname); - - if (entry != null) { - // real zip file entry - if (entry.isFolder()) { - childrenStrategy.setParent(entry.getName()); - } - } else { - // logical zip file entry - // (portion of the path of a real zip file entry) - childrenStrategy.setParent(zname); - } - - scanDocument(childrenStrategy); - children = childrenStrategy.getChildren(); - } // synchronize - - return children; - } - - } - - /** ----------------------------------------------------------- - * This class adds new virtual attribute "java.io.File". - * Because of the fact that FileObjects of __Sample__FileSystem are convertible - * to java.io.File by means of attributes. */ - /*private static class InnerAttrs extends DefaultAttributes { - //static final long serialVersionUID = 1257351369229921993L; - __Sample__FileSystem sfs; - public InnerAttrs(__Sample__FileSystem sfs, AbstractFileSystem.Info info, - AbstractFileSystem.Change change,AbstractFileSystem.List list ) { - super(info, change, list); - this.sfs = sfs; - } - public Object readAttribute(String name, String attrName) { - if (attrName.equals("java.io.File")) // NOI18N - return sfs.getFile(name); - - return super.readAttribute(name, attrName); - } - }*/ - - /* ----------------------------------------------------------- - // Optional special implementations of copy and (cross-directory) move. - private class TransferImpl implements Transfer { - - public boolean copy(String name, Transfer target, String targetName) throws IOException { - // Only permit special implementation within single FS - // (or you could implement it across filesystems if you wished): - if (target != this) return false; - // Specially copy the file in an efficient way, e.g. implement - // a copy-on-write algorithm. - return true; - } - - public boolean move(String name, Transfer target, String targetName) throws IOException { - // Only permit special implementation within single FS - // (or you could implement it across filesystems if you wished): - if (target != this) return false; - // Specially move the file, e.g. retain rename information even - // across directories in a version-control system. - return true; - } - - } - */ - - /* ----------------------------------------------------------- - * This interface hides an action will be performed on an entry. - */ - private interface Strategy { - boolean evaluate(Entry entry); - } - - /* ----------------------------------------------------------- - * Recognizes editable (read-write) entires - */ - private class EditableStrategy - implements Strategy { - private String scope; - - public EditableStrategy(String scope) { - this.scope = scope; - } - - public boolean evaluate(Entry entry) { - // recognizes all entries in a subtree of the - // 'scope' as editable entries - return entry && entry.getName().startsWith(scope); - } - } - - /* ----------------------------------------------------------- - * Recognizes and accumulates immediate children of the parent. - */ - private class ChildrenStrategy - implements Strategy { - private String parent; - private Collection children = new HashSet(); - - public void setParent(String name) { - parent = (name.length() > 0) ? (name + SEPARATOR) : ""; - - if (children == null) - children = (java.util.List)new LinkedList(); - - children.clear(); - } - - public boolean evaluate(Entry entry) { - // do not accept "children" of a file - // ignore "read only" part of the filesystem - if (!entry.isReadOnly()) { - // identify a child - if ((entry.getName().length() > 0) && - (entry.getName().startsWith(parent))) { - // identify an immediate child - String child = entry.getName(); - - if (parent.length() > 0) { - child = entry.getName().substring(parent.length()); - } - - int idx = child.indexOf(SEPARATOR); - - if (idx > 0) // more path elements ahead - child = child.substring(0, idx); - - return children.add(child); - } - } - - return false; - } - - public int countChildren() { - return children.size(); - } - - public String[] getChildren() { - String[] chn = new String[children.size()]; - Iterator itr = children.iterator(); - int idx = 0; - - while (itr.hasNext()) { - chn[idx++] = (String)itr.next(); - } - - return chn; - } - } - - /* ----------------------------------------------------------- - * Recognizes cache entries which have to be save into new archive. - */ - private class ModifiedStrategy - implements Strategy { - private boolean modified; - - public boolean evaluate(Entry entry) { - modified |= entry.isModified(); - return entry.isModified(); - } - - public boolean isModified() { - return modified; - } - } - - /* ----------------------------------------------------------- - * Saves each entry in the filesystem cache. - */ - private class SaveStrategy - implements Strategy { - ZipOutputStream docos; - IOException ioexp; - - public SaveStrategy(File newdoc) - throws IOException { - docos = new ZipOutputStream(new FileOutputStream(newdoc)); - ioexp = null; // success by default - } - - public boolean evaluate(Entry entry) { - if (entry.getName().length() == 0) - return false; - - try { - entry.save(docos); - } catch (IOException ioe) { - if (ioexp == null) - ioexp = ioe; - } - - return true; - } - - public void close() - throws IOException { - if (docos != null) { - try { - docos.close(); - } catch (IOException ioe) { - ioexp = ioe; - } finally { - docos = null; - } - - if (ioexp != null) { - throw ioexp; - } - } - } - } - - /* ----------------------------------------------------------- - * Cleans each entiry in the filesystem cache. - */ - private class CleanStrategy - implements Strategy { - public boolean evaluate(Entry entry) { - try { - entry.clean(); - } catch (java.lang.Exception exp) { - // sorry! can do nothing about it. - } - - return true; - } - } - - /* ----------------------------------------------------------- - * ReadOnly cache entry - */ - private class Entry { - private String name; - private boolean folder; - private long size; - private long time; - private File node; // data files only - - public Entry(ZipEntry entry) { - if (entry != null) { - name = entry.getName(); - folder = entry.isDirectory(); - size = entry.getSize(); - time = entry.getTime(); - - // removes tail file separator from a folder name - if (folder && name.endsWith(SEPARATOR)) { - name = name.substring( - 0, name.length() - SEPARATOR.length()); - } - } else { - // 'null' is special cace of root folder - name = ""; - folder = true; - size = 0; - time = -1; - } - } - - public boolean isReadOnly() { - return true; - } - - public boolean isFolder() { - return folder; - } - - public boolean isModified() { - return false; - } - - public String getName() { - return name; - } - - public long getSize() { - return size; - } - - public long getTime() { - // adjust last modified time to the java.io.File - return (time >= 0) ? time : 0; - } - - public InputStream getInputStream() - throws FileNotFoundException { - return !isFolder() ? new FileInputStream(getFile()) : null; - } - - public OutputStream getOutputStream() - throws IOException { - return null; - } - - public void rename(String name) - throws IOException { - // BUG: this is the design bug. Cache has to manage such kind - // of operation in order to keep the data integrity. - this.name = name; - } - - public void save(ZipOutputStream arch) - throws IOException { - InputStream is = null; - ZipEntry entry = new ZipEntry( - getName() + ((isFolder()) ? SEPARATOR : "")); - - try { - if (isFolder()) { - // folder - entry.setMethod(ZipEntry.STORED); - entry.setSize(0); - CRC32 crc = new CRC32(); - entry.setCrc(crc.getValue()); - entry.setTime(getTime()); - arch.putNextEntry(entry); - } else { - // file - if (!isModified()) - entry.setTime(getTime()); - else - entry.setTime(node.lastModified()); - - arch.putNextEntry(entry); - is = getInputStream(); - FileUtil.copy(is, arch); - } - } finally { - // close streams - if (is != null) { - try { - is.close(); - } catch (java.io.IOException ioe) { - // sorry! can do nothing about it. - } - } - - if (arch != null) - arch.closeEntry(); - } - } - - public void clean() - throws IOException { - if (node != null) - node.delete(); - } - - public String toString() { - return ( - ((isReadOnly()) ? "RO " : "RW ") + - ((isFolder()) ? "D" : "F") + - " \"" + getName() + "\""); - } - - /* package */ File getFile() - throws FileNotFoundException { - if (node == null) { - try { - node = File.createTempFile(TMP_FILE_PREF, TMP_FILE_SUFX); - // copy the file from archive to the cache - OutputStream nos = null; - InputStream zis = null; - - try { - ZipEntry entry = zipFile.getEntry(getName()); - - if (entry != null) { - // copy existing file to the cache - zis = zipFile.getInputStream(entry); - nos = new FileOutputStream(node); - FileUtil.copy(zis, nos); - } - } finally { - // close streams - if (nos != null) { - try { - nos.close(); - } catch (java.io.IOException ioe) { - } - } - - if (zis != null) { - try { - zis.close(); - } catch (java.io.IOException ioe) { - } - } - } - } catch (java.lang.Exception exp) { - // delete cache file - if (node != null) - node.delete(); - - node = null; - throw new FileNotFoundException( - "cannot access file: " + getName()); // I18N - } - } - - return node; - } - - } - - /* ----------------------------------------------------------- - * ReadWrite cache entry - */ - private class ReadWriteEntry - extends Entry { - private boolean modified; - - // 'null' is special cace of root folder - public ReadWriteEntry(ZipEntry entry) { - super(entry); - } - - public boolean isReadOnly() { - return false; - } - - public boolean isModified() { - return modified; - } - - public void rename(String name) - throws IOException { - modified = true; - super.rename(name); - } - - public OutputStream getOutputStream() - throws IOException { - modified = true; - return !isFolder() ? new FileOutputStream(getFile()) : null; - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystemBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystemBeanInfo.java deleted file mode 100644 index ad3d18e154db..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystemBeanInfo.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.filesystem; - -import java.awt.Image; -import java.io.File; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.filesystems.FileSystem; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -/** - * Description of the OpenOffice.org Document filesystem. - */ -public class OpenOfficeDocFileSystemBeanInfo - extends SimpleBeanInfo { - private static String ICONLOCATION = - "org/openoffice/netbeans/modules/office/resources"; - private static String COLORICON16NAME = - ICONLOCATION + File.separator + "OpenOfficeDocFileSystemIcon.png"; - private static String COLORICON32NAME = - ICONLOCATION + File.separator + "OpenOfficeDocFileSystemIcon32.png"; - - /** - * Retrieves an additional bean information. - */ - public BeanInfo[] getAdditionalBeanInfo() { - try { - return new BeanInfo[] { - Introspector.getBeanInfo(FileSystem.class) - }; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - /* - // If you have a visual dialog to customize configuration of the - // filesystem: - public BeanDescriptor getBeanDescriptor() - { - return new BeanDescriptor(OpenOfficeDocFileSystem.class, - OpenOfficeDocFileSystemCustomizer.class); - } - */ - /** - * Retrieves bean property descriptors. - */ - public PropertyDescriptor[] getPropertyDescriptors() { - try { - // Included only to make it a writable property (it is read-only - // in FileSystem): - PropertyDescriptor readOnly = new PropertyDescriptor( - "readOnly", OpenOfficeDocFileSystem.class); - readOnly.setDisplayName(NbBundle.getMessage( - OpenOfficeDocFileSystemBeanInfo.class, "PROP_readOnly")); - readOnly.setShortDescription(NbBundle.getMessage( - OpenOfficeDocFileSystemBeanInfo.class, "HINT_readOnly")); - - // This could be whatever properties you use to configure the - // filesystem: - PropertyDescriptor document = new PropertyDescriptor( - "Document", OpenOfficeDocFileSystem.class); - document.setDisplayName(NbBundle.getMessage( - OpenOfficeDocFileSystemBeanInfo.class, "PROP_document")); - document.setShortDescription(NbBundle.getMessage( - OpenOfficeDocFileSystemBeanInfo.class, "HINT_document")); - // Request to the property editor that it be permitted only to - // choose directories: - document.setValue("directories", Boolean.FALSE); // NOI18N - document.setValue("files", Boolean.TRUE); // NOI18N - - return new PropertyDescriptor[] {readOnly, document}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - /** - * Retrieves an icon by the icon type. - */ - public Image getIcon(int type) { - if ((type == BeanInfo.ICON_COLOR_16x16) || - (type == BeanInfo.ICON_MONO_16x16)) { - return Utilities.loadImage(COLORICON16NAME); - } else { - return Utilities.loadImage(COLORICON32NAME); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/loader/Bundle.properties deleted file mode 100644 index 9bc1619697f1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/Bundle.properties +++ /dev/null @@ -1,30 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# -# Datasystems API -#PROP_myProp=<name of my property> -#HINT_myProp=<description of my property> -#LBL_DataNode_exec_sheet=Execution -#HINT_DataNode_exec_sheet=Properties pertaining to compiling, running, and debugging. -# x-no-translate -LBL_loaderName=<display name of the data loader> -# Datasystems API -#PROP_myProp=<name of my property> -#HINT_myProp=<description of my property> -#LBL_DataNode_exec_sheet=Execution -#HINT_DataNode_exec_sheet=Properties pertaining to compiling, running, and debugging. -LBL_loaderName=<display name of the data loader> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java deleted file mode 100644 index 268c6054b2bb..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.IOException; -import java.io.File; - -import org.openide.actions.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -import org.openoffice.netbeans.modules.office.actions.MountDocumentAction; - -/** Recognizes single files in the Repository as being of a certain type. - */ -public class OfficeDocumentDataLoader extends UniFileLoader { - - public OfficeDocumentDataLoader() { - this("org.openoffice.netbeans.modules.office.loader.OfficeDocumentDataObject"); - } - - // Can be useful for subclasses: - protected OfficeDocumentDataLoader(String recognizedObjectClass) { - super(recognizedObjectClass); - } - - protected String defaultDisplayName() { - return "Office Document"; - } - - protected void initialize() { - super.initialize(); - - ExtensionList extensions = new ExtensionList(); - extensions.addExtension("sxw"); - extensions.addExtension("sxc"); - extensions.addExtension("sxd"); - extensions.addExtension("sxi"); - setExtensions(extensions); - } - - protected FileObject findPrimaryFile(FileObject fo) { - ExtensionList extensions = getExtensions(); - - if (!extensions.isRegistered(fo)) - return null; - - File document = FileUtil.toFile(fo); - JarFileSystem jarFs = new JarFileSystem(); - - try { - jarFs.setJarFile(document); - } catch (IOException e) { - return null; - } catch (Exception e) { - return null; - } - - return fo; - } - - protected SystemAction[] defaultActions() { - return new SystemAction[] { - SystemAction.get(OpenAction.class), - null, - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - SystemAction.get(PasteAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - SystemAction.get(PropertiesAction.class), - }; - } - - protected MultiDataObject createMultiObject(FileObject primaryFile) throws - DataObjectExistsException, IOException { - return new OfficeDocumentDataObject(primaryFile, this); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoaderBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoaderBeanInfo.java deleted file mode 100644 index 1f036b155348..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoaderBeanInfo.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.Image; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -public class OfficeDocumentDataLoaderBeanInfo extends SimpleBeanInfo { - - // If you have additional properties: - /* - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor myProp = new PropertyDescriptor("myProp", OfficeDocumentDataLoader.class); - myProp.setDisplayName(NbBundle.getMessage(OfficeDocumentDataLoaderBeanInfo.class, "PROP_myProp")); - myProp.setShortDescription(NbBundle.getMessage(OfficeDocumentDataLoaderBeanInfo.class, "HINT_myProp")); - return new PropertyDescriptor[] {myProp}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - */ - - public BeanInfo[] getAdditionalBeanInfo() { - try { - // I.e. MultiFileLoader.class or UniFileLoader.class. - return new BeanInfo[] {Introspector.getBeanInfo(OfficeDocumentDataLoader.class.getSuperclass())}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif"); - } else { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/resources/OfficeIcon32.gif"); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java deleted file mode 100644 index 32d438f1f3c2..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataNode.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.datatransfer.Transferable; -import java.util.List; -import java.io.*; - -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.util.NbBundle; -import org.openide.filesystems.*; - -import org.openoffice.netbeans.modules.office.actions.OfficeDocumentCookie; -import org.openoffice.netbeans.modules.office.nodes.OfficeDocumentChildren; - -/** A node to represent this object. - */ -public class OfficeDocumentDataNode extends DataNode { - - public OfficeDocumentDataNode(OfficeDocumentDataObject obj) { - this(obj, new OfficeDocumentChildren((OfficeDocumentCookie) - obj.getCookie(OfficeDocumentCookie.class))); - } - - public OfficeDocumentDataNode(OfficeDocumentDataObject obj, Children ch) { - super(obj, ch); - setIconBase("/org/openoffice/netbeans/modules/office/resources/OfficeIcon"); - } - - protected OfficeDocumentDataObject getOfficeDocumentDataObject() { - return (OfficeDocumentDataObject)getDataObject(); - } - - // Allow for pasting of Script Parcels to Office Documents - protected void createPasteTypes(Transferable t, List ls) { - Node[] copies = NodeTransfer.nodes(t, NodeTransfer.COPY); - - if (copies != null) { - for (int i = 0; i < copies.length; i++) { - if (copies[i] instanceof ParcelDataNode) { - File source = FileUtil.toFile(((ParcelDataNode) - copies[i]).getDataObject().getPrimaryFile()); - File target = FileUtil.toFile(getDataObject().getPrimaryFile()); - - if (source.exists() && source.canRead() && - target.exists() && target.canWrite()) { - ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)copies[i], target, - false)); - } - } - } - } - - Node[] moves = NodeTransfer.nodes(t, NodeTransfer.MOVE); - - if (moves != null) { - for (int i = 0; i < moves.length; i++) { - if (moves[i] instanceof ParcelDataNode) { - File source = FileUtil.toFile(((ParcelDataNode) - moves[i]).getDataObject().getPrimaryFile()); - File target = FileUtil.toFile(getDataObject().getPrimaryFile()); - - if (source.exists() && source.canRead() && - target.exists() && target.canWrite()) { - ls.add(new ParcelDataNode.ParcelPasteType((ParcelDataNode)moves[i], target, - true)); - } - } - } - } - - // Also try superclass, but give it lower priority: - super.createPasteTypes(t, ls); - } - - /* Example of adding Executor / Debugger / Arguments to node: - protected Sheet createSheet() { - Sheet sheet = super.createSheet(); - Sheet.Set set = sheet.get(ExecSupport.PROP_EXECUTION); - if (set == null) { - set = new Sheet.Set(); - set.setName(ExecSupport.PROP_EXECUTION); - set.setDisplayName(NbBundle.getMessage(OfficeDocumentDataNode.class, "LBL_DataNode_exec_sheet")); - set.setShortDescription(NbBundle.getMessage(OfficeDocumentDataNode.class, "HINT_DataNode_exec_sheet")); - } - ((ExecSupport)getCookie(ExecSupport.class)).addProperties(set); - // Maybe: - ((CompilerSupport)getCookie(CompilerSupport.class)).addProperties(set); - sheet.put(set); - return sheet; - } - */ - - // Don't use getDefaultAction(); just make that first in the data loader's getActions list - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataObject.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataObject.java deleted file mode 100644 index 742b7d882968..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataObject.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import org.openide.actions.*; -import org.openide.cookies.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.util.HelpCtx; - -import org.openoffice.netbeans.modules.office.actions.*; - -public class OfficeDocumentDataObject extends MultiDataObject { - - public OfficeDocumentDataObject(FileObject pf, - OfficeDocumentDataLoader loader) throws DataObjectExistsException { - super(pf, loader); - init(); - } - - private void init() { - CookieSet cookies = getCookieSet(); - cookies.add(new OfficeDocumentSupport(this)); - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - protected Node createNodeDelegate() { - return new OfficeDocumentDataNode(this); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java deleted file mode 100644 index 7ac5ce14069a..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.IOException; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.ErrorManager; - -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileLock; -import org.openide.filesystems.FileUtil; -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.Repository; - -import org.openide.loaders.DataObject; -import org.openide.loaders.DataFolder; -import org.openide.loaders.DataObjectExistsException; - -import org.openide.nodes.Node; -import org.openide.util.datatransfer.NewType; - -import org.openoffice.netbeans.modules.office.actions.ParcelFolderCookie; -import org.openoffice.netbeans.modules.office.utils.PackageRemover; - -public class ParcelContentsFolder extends DataFolder { - public ParcelContentsFolder(FileObject pf, - ParcelContentsFolderDataLoader loader) - throws DataObjectExistsException { - super(pf, loader); - } - - public Node createNodeDelegate() { - return new DataFolder.FolderNode() { - public NewType[] getNewTypes() { - NewType[] newtypes = new NewType[1]; - newtypes[0] = new NewType() { - public String getName() { - return "New Script"; - } - - public void create() { - DataFolder contents = (DataFolder)getDataObject(); - ParcelFolderCookie cookie = - (ParcelFolderCookie)contents.getFolder(). - getCookie(ParcelFolderCookie.class); - - String language = cookie.getLanguage(); - ParcelContentsFolder.createEmptyScript(contents, - language); - } - }; - return newtypes; - } - }; - } - - public static void createEmptyScript(DataFolder parent, String language) { - String sourceFile = "Templates/OfficeScripting/EmptyScript/Empty"; - - if (language.equalsIgnoreCase("java")) { - sourceFile += ".java"; - } - else if (language.equalsIgnoreCase("beanshell")) { - sourceFile += ".bsh"; - } else { - NotifyDescriptor d = new NotifyDescriptor.Message( - "Language not defined for this Parcel Folder"); - TopManager.getDefault().notify(d); - return; - } - - FileSystem fs = Repository.getDefault().getDefaultFileSystem(); - DataObject result = null; - - try { - DataObject dObj = DataObject.find(fs.findResource(sourceFile)); - result = dObj.createFromTemplate(parent); - } catch (IOException ioe) { - ErrorManager.getDefault().notify(ioe); - } - - FileObject fo = result.getPrimaryFile(); - - if (fo.getExt().equals("java")) { - FileLock lock = null; - - try { - PackageRemover.removeDeclaration(FileUtil.toFile(fo)); - - // IssueZilla 11986 - rename the FileObject - // so the JavaNode is resynchronized - lock = fo.lock(); - - if (lock != null) { - fo.rename(lock, fo.getName(), fo.getExt()); - } - } catch (IOException ioe) { - NotifyDescriptor d = new NotifyDescriptor.Message( - "Error removing package declaration from file: " + - fo.getNameExt() + - ". You should manually remove this declaration " + - "before building the Parcel Recipe"); - TopManager.getDefault().notify(d); - } finally { - if (lock != null) { - lock.releaseLock(); - } - } - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java deleted file mode 100644 index 77a0e490b192..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import org.openide.loaders.*; -import org.openide.filesystems.FileObject; -import org.openide.actions.*; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -import org.openoffice.idesupport.zip.ParcelZipper; - -public class ParcelContentsFolderDataLoader extends UniFileLoader { - - public ParcelContentsFolderDataLoader() { - this("org.openide.loaders.DataFolder"); - } - - protected ParcelContentsFolderDataLoader(String recognizedObjectClass) { - super(recognizedObjectClass); - } - - protected String defaultDisplayName() { - return "Office Script Parcel Contents"; - } - - protected FileObject findPrimaryFile(FileObject fo) { - if (!fo.isFolder() || - !fo.getName().equals(ParcelZipper.CONTENTS_DIRNAME) || - fo.getFileObject(ParcelZipper.PARCEL_DESCRIPTOR_XML) == null) - return null; - - return fo; - } - - protected SystemAction[] defaultActions() { - return new SystemAction[] { - SystemAction.get(PasteAction.class), - SystemAction.get(NewAction.class), - // null, - // SystemAction.get(PropertiesAction.class), - }; - } - - protected MultiDataObject createMultiObject(FileObject primaryFile) - throws DataObjectExistsException { - return new ParcelContentsFolder(primaryFile, this); - } - - protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, - FileObject primaryFile) { - return new FileEntry.Folder(obj, primaryFile); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoaderBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoaderBeanInfo.java deleted file mode 100644 index b5c925973199..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoaderBeanInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.Image; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -/** Description of {@link ParcelFolderDataLoader}. - */ -public class ParcelContentsFolderDataLoaderBeanInfo extends SimpleBeanInfo { - - // If you have additional properties: - /* - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor myProp = new PropertyDescriptor("myProp", ParcelFolderDataLoader.class); - myProp.setDisplayName(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "PROP_myProp")); - myProp.setShortDescription(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "HINT_myProp")); - return new PropertyDescriptor[] {myProp}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - */ - - public BeanInfo[] getAdditionalBeanInfo() { - try { - // I.e. MultiFileLoader.class or UniFileLoader.class. - return new BeanInfo[] {Introspector.getBeanInfo(ParcelContentsFolderDataLoader.class.getSuperclass())}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon.gif"); - } else { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon32.gif"); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java deleted file mode 100644 index 86e86742c43e..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.IOException; -import java.io.File; - -import org.openide.actions.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -import org.openoffice.netbeans.modules.office.actions.*; -import org.openoffice.idesupport.zip.ParcelZipper; - -/** Recognizes single files in the Repository as being of a certain type. - */ -public class ParcelDataLoader extends UniFileLoader { - - public ParcelDataLoader() { - this("org.openoffice.netbeans.modules.office.loader.ParcelDataObject"); - } - - // Can be useful for subclasses: - protected ParcelDataLoader(String recognizedObjectClass) { - super(recognizedObjectClass); - } - - protected String defaultDisplayName() { - return "Office Script Parcel"; - } - - protected void initialize() { - super.initialize(); - - ExtensionList extensions = new ExtensionList(); - extensions.addExtension(ParcelZipper.PARCEL_EXTENSION); - setExtensions(extensions); - } - - protected SystemAction[] defaultActions() { - return new SystemAction[] { - SystemAction.get(DeployParcelAction.class), - null, - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - SystemAction.get(PropertiesAction.class), - }; - } - - protected MultiDataObject createMultiObject(FileObject primaryFile) throws - DataObjectExistsException, IOException { - return new ParcelDataObject(primaryFile, this); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoaderBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoaderBeanInfo.java deleted file mode 100644 index 68c0374a55e9..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoaderBeanInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.Image; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -/** Description of {@link ParcelDataLoader}. - */ -public class ParcelDataLoaderBeanInfo extends SimpleBeanInfo { - - // If you have additional properties: - /* - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor myProp = new PropertyDescriptor("myProp", ParcelDataLoader.class); - myProp.setDisplayName(NbBundle.getMessage(ParcelDataLoaderBeanInfo.class, "PROP_myProp")); - myProp.setShortDescription(NbBundle.getMessage(ParcelDataLoaderBeanInfo.class, "HINT_myProp")); - return new PropertyDescriptor[] {myProp}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - */ - - public BeanInfo[] getAdditionalBeanInfo() { - try { - // I.e. MultiFileLoader.class or UniFileLoader.class. - return new BeanInfo[] {Introspector.getBeanInfo(ParcelDataLoader.class.getSuperclass())}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelDataIcon.gif"); - } else { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelDataIcon32.gif"); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataNode.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataNode.java deleted file mode 100644 index cb51b982e7c4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataNode.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.*; -import java.awt.datatransfer.Transferable; -import java.util.zip.*; - -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.filesystems.FileObject; -import org.openide.util.NbBundle; -import org.openide.util.datatransfer.*; -import org.openide.ErrorManager; -import org.openide.windows.OutputWriter; - -import org.openoffice.netbeans.modules.office.actions.ParcelCookie; - -/** A node to represent this object. - */ -public class ParcelDataNode extends DataNode { - - public ParcelDataNode(ParcelDataObject obj) { - this(obj, Children.LEAF); - } - - public ParcelDataNode(ParcelDataObject obj, Children ch) { - super(obj, ch); - setIconBase("/org/openoffice/netbeans/modules/office/resources/ParcelIcon"); - } - - protected ParcelDataObject getParcelDataObject() { - return (ParcelDataObject)getDataObject(); - } - - public static class ParcelPasteType extends PasteType { - ParcelDataNode sourceParcel = null; - File targetDocument = null; - boolean isCut = false; - - public ParcelPasteType(ParcelDataNode sourceParcel, - File targetDocument, boolean isCut) { - this.sourceParcel = sourceParcel; - this.targetDocument = targetDocument; - this.isCut = isCut; - } - - public Transferable paste() { - ParcelCookie parcelCookie = - (ParcelCookie)sourceParcel.getCookie(ParcelCookie.class); - parcelCookie.deploy(targetDocument); - - if (isCut) { - FileObject fo = sourceParcel.getDataObject().getPrimaryFile(); - - try { - fo.delete(); - } catch (IOException ioe) {} - - return ExTransferable.EMPTY; - } else { - return null; - } - } - } - - /* Example of adding Executor / Debugger / Arguments to node: - protected Sheet createSheet() { - Sheet sheet = super.createSheet(); - Sheet.Set set = sheet.get(ExecSupport.PROP_EXECUTION); - if (set == null) { - set = new Sheet.Set(); - set.setName(ExecSupport.PROP_EXECUTION); - set.setDisplayName(NbBundle.getMessage(ParcelDataNode.class, "LBL_DataNode_exec_sheet")); - set.setShortDescription(NbBundle.getMessage(ParcelDataNode.class, "HINT_DataNode_exec_sheet")); - } - ((ExecSupport)getCookie(ExecSupport.class)).addProperties(set); - // Maybe: - ((CompilerSupport)getCookie(CompilerSupport.class)).addProperties(set); - sheet.put(set); - return sheet; - } - */ - - // Don't use getDefaultAction(); just make that first in the data loader's getActions list - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataObject.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataObject.java deleted file mode 100644 index 0c9cf1720ca3..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataObject.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import org.openide.actions.*; -import org.openide.cookies.*; -import org.openide.filesystems.FileObject; -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.util.HelpCtx; - -import org.openoffice.netbeans.modules.office.actions.*; - -/** Represents a Parcel object in the Repository. - */ -public class ParcelDataObject extends MultiDataObject { - - public ParcelDataObject(FileObject pf, - ParcelDataLoader loader) throws DataObjectExistsException { - super(pf, loader); - init(); - } - - private void init() { - CookieSet cookies = getCookieSet(); - cookies.add(new ParcelSupport(getPrimaryFile())); - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - // If you add context help, change to: - // return new HelpCtx(ParcelDataObject.class); - } - - protected Node createNodeDelegate() { - return new ParcelDataNode(this); - } - - /* If you made an Editor Support you will want to add these methods: - - final void addSaveCookie(SaveCookie save) { - getCookieSet().add(save); - } - - final void removeSaveCookie(SaveCookie save) { - getCookieSet().remove(save); - } - - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java deleted file mode 100644 index 58b94c91031c..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.IOException; - -import org.openide.actions.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -import org.openoffice.idesupport.OfficeDocument; - -/** Recognizes single files in the Repository as being of a certain type. - */ -public class ParcelDescriptorDataLoader extends UniFileLoader { - - public ParcelDescriptorDataLoader() { - this("org.openoffice.netbeans.modules.office.loader.ParcelDescriptorDataObject"); - } - - // Can be useful for subclasses: - protected ParcelDescriptorDataLoader(String recognizedObjectClass) { - super(recognizedObjectClass); - } - - protected String defaultDisplayName() { - return OfficeDocument.OFFICE_PRODUCT_NAME + " Script Parcel Descriptor"; - } - - protected void initialize() { - super.initialize(); - - getExtensions().addMimeType("text/x-parcel+xml"); - } - - protected SystemAction[] defaultActions() { - return new SystemAction[] { - SystemAction.get(OpenAction.class), - null, - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - SystemAction.get(PasteAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - SystemAction.get(PropertiesAction.class), - }; - } - - protected MultiDataObject createMultiObject(FileObject primaryFile) throws - DataObjectExistsException, IOException { - return new ParcelDescriptorDataObject(primaryFile, this); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoaderBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoaderBeanInfo.java deleted file mode 100644 index f9824ca29b21..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoaderBeanInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.Image; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -/** Description of {@link ParcelDescriptorDataLoader}. - */ -public class ParcelDescriptorDataLoaderBeanInfo extends SimpleBeanInfo { - - // If you have additional properties: - /* - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor myProp = new PropertyDescriptor("myProp", ParcelDescriptorDataLoader.class); - myProp.setDisplayName(NbBundle.getMessage(ParcelDescriptorDataLoaderBeanInfo.class, "PROP_myProp")); - myProp.setShortDescription(NbBundle.getMessage(ParcelDescriptorDataLoaderBeanInfo.class, "HINT_myProp")); - return new PropertyDescriptor[] {myProp}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - */ - - public BeanInfo[] getAdditionalBeanInfo() { - try { - // I.e. MultiFileLoader.class or UniFileLoader.class. - return new BeanInfo[] {Introspector.getBeanInfo(ParcelDescriptorDataLoader.class.getSuperclass())}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelDescriptorDataIcon.gif"); - } else { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelDescriptorDataIcon32.gif"); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataNode.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataNode.java deleted file mode 100644 index e92a321cd726..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataNode.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.util.NbBundle; - -import org.openoffice.netbeans.modules.office.nodes.*; -import org.openoffice.netbeans.modules.office.actions.*; - -/** A node to represent this object. - */ -public class ParcelDescriptorDataNode extends DataNode { - - public ParcelDescriptorDataNode(ParcelDescriptorDataObject obj) { - this(obj, Children.LEAF); - } - - public ParcelDescriptorDataNode(ParcelDescriptorDataObject obj, Children ch) { - super(obj, ch); - setHidden(true); - setIconBase("/org/openoffice/netbeans/modules/office/resources/OfficeIcon"); - } - - protected ParcelDescriptorDataObject getParcelDescriptorDataObject() { - return (ParcelDescriptorDataObject)getDataObject(); - } - - public boolean canRename() { - return false; - } - - /* Example of adding Executor / Debugger / Arguments to node: - protected Sheet createSheet() { - Sheet sheet = super.createSheet(); - Sheet.Set set = sheet.get(ExecSupport.PROP_EXECUTION); - if (set == null) { - set = new Sheet.Set(); - set.setName(ExecSupport.PROP_EXECUTION); - set.setDisplayName(NbBundle.getMessage(ParcelDescriptorDataNode.class, "LBL_DataNode_exec_sheet")); - set.setShortDescription(NbBundle.getMessage(ParcelDescriptorDataNode.class, "HINT_DataNode_exec_sheet")); - } - ((ExecSupport)getCookie(ExecSupport.class)).addProperties(set); - // Maybe: - ((CompilerSupport)getCookie(CompilerSupport.class)).addProperties(set); - sheet.put(set); - return sheet; - } - */ - - // Don't use getDefaultAction(); just make that first in the data loader's getActions list - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataObject.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataObject.java deleted file mode 100644 index f72735cfc2ad..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataObject.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import org.openide.actions.*; -import org.openide.cookies.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.nodes.*; -import org.openide.util.HelpCtx; - -import org.openoffice.netbeans.modules.office.actions.ParcelDescriptorEditorSupport; -import org.openoffice.netbeans.modules.office.actions.ParcelDescriptorParserSupport; - -/** Represents a ParcelDescriptor object in the Repository. - */ -public class ParcelDescriptorDataObject extends MultiDataObject { - - private boolean canParse = false; - - public ParcelDescriptorDataObject(FileObject pf, - ParcelDescriptorDataLoader loader) throws DataObjectExistsException { - super(pf, loader); - init(); - } - - private void init() { - FileObject fo = getPrimaryFile(); - - if (FileUtil.toFile(fo) != null) - canParse = true; - - CookieSet cookies = getCookieSet(); - cookies.add(new ParcelDescriptorEditorSupport(this)); - - if (canParse) - cookies.add(new ParcelDescriptorParserSupport(getPrimaryFile())); - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - protected Node createNodeDelegate() { - if (canParse) - return new ParcelDescriptorDataNode(this); - else - return new ParcelDescriptorDataNode(this, Children.LEAF); - } - - // If you made an Editor Support you will want to add these methods: - public final void addSaveCookie(SaveCookie save) { - getCookieSet().add(save); - } - - public final void removeSaveCookie(SaveCookie save) { - getCookieSet().remove(save); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java deleted file mode 100644 index 8d2755576aa6..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.File; -import java.io.IOException; -import java.beans.PropertyEditor; -import java.beans.PropertyEditorSupport; - -import org.openide.loaders.DataFolder; -import org.openide.loaders.DataObject; -import org.openide.loaders.DataFilter; -import org.openide.loaders.DataObjectExistsException; - -import org.openide.filesystems.FileObject; -import org.openide.filesystems.FileUtil; - -import org.openide.nodes.CookieSet; -import org.openide.nodes.Node; -import org.openide.nodes.PropertySupport; -import org.openide.nodes.Sheet; -import org.openide.util.HelpCtx; - -import org.openoffice.idesupport.filter.*; -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.actions.ParcelFolderCookie; -import org.openoffice.netbeans.modules.office.actions.ParcelFolderSupport; - -public class ParcelFolder extends DataFolder { - - public static final String LANGUAGE_ATTRIBUTE = "language"; - - public ParcelFolder(FileObject pf, ParcelFolderDataLoader loader) - throws DataObjectExistsException { - super(pf, loader); - CookieSet cookies = getCookieSet(); - cookies.add(new ParcelFolderSupport(this)); - } - - public Node createNodeDelegate() { - return new ParcelFolderNode(this, new ParcelFolderFilter()); - } - - public class ParcelFolderNode extends DataFolder.FolderNode { - private static final String LOCATION = "location"; - private static final String FILTER = "filter"; - private static final String LANGUAGE = LANGUAGE_ATTRIBUTE; - private static final String CLASSPATH = "classpath"; - - private File location; - private FileFilter filter; - private String language; - private String classpath; - - private final FileFilter DEFAULT_FILTER = BinaryOnlyFilter.getInstance(); - - public ParcelFolderNode(ParcelFolder pf, DataFilter dataFilter) { - super(pf.createNodeChildren(dataFilter)); - - location = (File)pf.getPrimaryFile().getAttribute(LOCATION); - - if (location == null) - location = FileUtil.toFile(pf.getPrimaryFile()); - - String name = (String)pf.getPrimaryFile().getAttribute(FILTER); - - if (name == null) - filter = DEFAULT_FILTER; - else { - for (int i = 0; i < availableFilters.length; i++) - if (name.equals(availableFilters[i].toString())) - filter = availableFilters[i]; - } - - language = (String)pf.getPrimaryFile().getAttribute(LANGUAGE); - - ParcelFolderCookie cookie = - (ParcelFolderCookie)pf.getCookie(ParcelFolderCookie.class); - String s = cookie.getClasspath(); - - if (s != null) { - classpath = s; - } else { - classpath = "."; - cookie.setClasspath(classpath); - } - } - - public File getTargetDir() { - return location; - } - - public FileFilter getFileFilter() { - return filter; - } - - public String getLanguage() { - if (language == null) - language = (String)getPrimaryFile().getAttribute(LANGUAGE); - - return language; - } - - public Sheet createSheet() { - Sheet sheet; - Sheet.Set props; - Node.Property prop; - - sheet = super.createSheet(); - props = sheet.get(Sheet.PROPERTIES); - - if (props == null) { - props = Sheet.createPropertiesSet(); - sheet.put(props); - } - - prop = createFilterProperty(); - props.put(prop); - - prop = createFilterProperty(); - props.put(prop); - - prop = createClasspathProperty(); - props.put(prop); - - return sheet; - } - - private Node.Property createLocationProperty() { - Node.Property prop = - new PropertySupport.ReadWrite(LOCATION, File.class, - "Location", "Output location of Parcel Zip File") { - public void setValue(Object obj) { - if (obj instanceof File) { - location = (File)obj; - - try { - getPrimaryFile().setAttribute(LOCATION, location); - } catch (IOException ioe) { - } - } - } - - public Object getValue() { - return location; - } - }; - prop.setValue("files", Boolean.FALSE); - return prop; - } - - private String[] languages = {"Java", "BeanShell"}; - - private Node.Property createLanguageProperty() { - Node.Property prop = - new PropertySupport.ReadWrite(LANGUAGE, String.class, - "Parcel Language", "Language of scripts in this Parcel") { - public void setValue(Object obj) { - if (obj instanceof String) { - language = (String)obj; - - try { - getPrimaryFile().setAttribute(LANGUAGE, language); - } catch (IOException ioe) { - } - } - } - - public Object getValue() { - if (language == null) - language = (String)getPrimaryFile().getAttribute(LANGUAGE); - - return language; - } - - public PropertyEditor getPropertyEditor() { - return new PropertyEditorSupport() { - public String[] getTags() { - return languages; - } - - public void setAsText(String text) { - for (int i = 0; i < languages.length; i++) - if (text.equals(languages[i])) - this.setValue(languages[i]); - } - - public String getAsText() { - return (String)this.getValue(); - } - }; - } - }; - return prop; - } - - private FileFilter[] availableFilters = new FileFilter[] { - BinaryOnlyFilter.getInstance(), AllFilesFilter.getInstance() - }; - - private Node.Property createFilterProperty() { - Node.Property prop = - new PropertySupport.ReadWrite(FILTER, String.class, - "File Filter", "Files to be included in Parcel") { - public void setValue(Object obj) { - if (obj instanceof FileFilter) { - filter = (FileFilter)obj; - - try { - getPrimaryFile().setAttribute(FILTER, filter.toString()); - } catch (IOException ioe) { - } - } - } - - public Object getValue() { - return filter; - } - - public PropertyEditor getPropertyEditor() { - return new PropertyEditorSupport() { - public String[] getTags() { - String[] tags = new String[availableFilters.length]; - - for (int i = 0; i < availableFilters.length; i++) - tags[i] = availableFilters[i].toString(); - - return tags; - } - - public void setAsText(String text) { - for (int i = 0; i < availableFilters.length; i++) - if (text.equals(availableFilters[i].toString())) - this.setValue(availableFilters[i]); - } - - public String getAsText() { - return this.getValue().toString(); - } - }; - } - }; - return prop; - } - - private Node.Property createClasspathProperty() { - Node.Property prop = - new PropertySupport.ReadWrite(CLASSPATH, String.class, - "Classpath", "Classpath property for scripts in this parcel") { - public void setValue(Object obj) { - if (obj instanceof String) { - classpath = (String)obj; - - ParcelFolderCookie cookie = (ParcelFolderCookie) - getDataObject().getCookie(ParcelFolderCookie.class); - cookie.setClasspath(classpath); - } - } - - public Object getValue() { - return classpath; - } - }; - return prop; - } - } - - private class ParcelFolderFilter implements DataFilter { - public boolean acceptDataObject(DataObject dobj) { - String name = dobj.getPrimaryFile().getNameExt(); - return !name.equals(ParcelZipper.PARCEL_DESCRIPTOR_XML); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java deleted file mode 100644 index 64b26c248d64..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.io.IOException; -import java.io.File; - -import org.openide.actions.*; -import org.openide.filesystems.*; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.actions.*; - -/** Recognizes single files in the Repository as being of a certain type. - */ - -public class ParcelFolderDataLoader extends UniFileLoader { - - public ParcelFolderDataLoader() { - this("org.openoffice.netbeans.modules.office.loader.ParcelFolder"); - } - - protected ParcelFolderDataLoader(String recognizedObjectClass) { - super(recognizedObjectClass); - } - - protected String defaultDisplayName() { - return "Office Script Parcel Folder"; - } - - protected FileObject findPrimaryFile(FileObject fo) { - if (!fo.isFolder()) - return null; - - FileObject contents = fo.getFileObject(ParcelZipper.CONTENTS_DIRNAME); - - if (contents == null) - return null; - - FileObject descriptor = contents.getFileObject( - ParcelZipper.PARCEL_DESCRIPTOR_XML); - - if (descriptor == null) - return null; - - return fo; - } - - protected SystemAction[] defaultActions() { - return new SystemAction[] { - SystemAction.get(CompileParcelAction.class), - SystemAction.get(BuildParcelAction.class), - SystemAction.get(ConfigureParcelAction.class), - null, - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - SystemAction.get(PropertiesAction.class), - }; - } - - protected MultiDataObject createMultiObject(FileObject primaryFile) throws - DataObjectExistsException, IOException { - return new ParcelFolder(primaryFile, this); - } - - protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, - FileObject primaryFile) { - return new FileEntry.Folder(obj, primaryFile); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoaderBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoaderBeanInfo.java deleted file mode 100644 index 357658bdb184..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoaderBeanInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.loader; - -import java.awt.Image; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -/** Description of {@link ParcelFolderDataLoader}. - */ -public class ParcelFolderDataLoaderBeanInfo extends SimpleBeanInfo { - - // If you have additional properties: - /* - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor myProp = new PropertyDescriptor("myProp", ParcelFolderDataLoader.class); - myProp.setDisplayName(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "PROP_myProp")); - myProp.setShortDescription(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "HINT_myProp")); - return new PropertyDescriptor[] {myProp}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - */ - - public BeanInfo[] getAdditionalBeanInfo() { - try { - // I.e. MultiFileLoader.class or UniFileLoader.class. - return new BeanInfo[] {Introspector.getBeanInfo(ParcelFolderDataLoader.class.getSuperclass())}; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon.gif"); - } else { - return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon32.gif"); - } - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java deleted file mode 100644 index b5e939bc2811..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/OfficeDocumentChildren.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.nodes; - -import java.io.IOException; -import java.util.*; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.nodes.*; -import org.openide.actions.*; -import org.openide.util.actions.SystemAction; -import org.openide.util.HelpCtx; - -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.netbeans.modules.office.utils.NagDialog; -import org.openoffice.netbeans.modules.office.actions.OfficeDocumentCookie; - -public class OfficeDocumentChildren extends Children.Keys - implements ChangeListener { - - private OfficeDocumentCookie document = null; - - public OfficeDocumentChildren(OfficeDocumentCookie cookie) { - document = cookie; - } - - private void refreshKeys() { - if (document == null) { - setKeys(Collections.EMPTY_SET); - return; - } - - Enumeration parcels = document.getParcels(); - - if (!parcels.hasMoreElements()) { - setKeys(Collections.EMPTY_SET); - return; - } - - ArrayList keys = new ArrayList(); - - while (parcels.hasMoreElements()) { - String parcel = (String)parcels.nextElement(); - keys.add(parcel); - } - - setKeys(keys); - } - - protected void addNotify() { - super.addNotify(); - document.addChangeListener(this); - refreshKeys(); - } - - protected void removeNotify() { - super.removeNotify(); - document.removeChangeListener(this); - setKeys(Collections.EMPTY_SET); - } - - protected Node[] createNodes(Object key) { - String name = (String)key; - return new Node[] {new ParcelNode(name)}; - } - - public void stateChanged(ChangeEvent e) { - refreshKeys(); - } - - private class ParcelNode extends AbstractNode { - private String name; - - public ParcelNode(String name) { - super(Children.LEAF); - this.name = name; - init(); - } - - private void init() { - setIconBase("/org/openoffice/netbeans/modules/office/resources/ParcelIcon"); - - setName(name); - setDisplayName(name.substring(name.lastIndexOf('/') + 1)); - setShortDescription(name); - } - - protected SystemAction[] createActions() { - return new SystemAction[] { - SystemAction.get(DeleteAction.class), - }; - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - public boolean canDestroy() { - return true; - } - - public void destroy() throws IOException { - OfficeSettings settings = OfficeSettings.getDefault(); - String message = "If you already have this document open in " + - "Office, please close it before continuing. Click OK to " + - "delete this parcel."; - - if (settings.getWarnBeforeParcelDelete()) { - NagDialog warning = NagDialog.createConfirmationDialog( - message, "Show this message in future", true); - - boolean result = warning.show(); - - if (!warning.getState()) - settings.setWarnBeforeParcelDelete(false); - - if (!result) - return; - } - - super.destroy(); - document.removeParcel(name); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ParcelDescriptorChildren.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ParcelDescriptorChildren.java deleted file mode 100644 index 52312ea03574..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ParcelDescriptorChildren.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.nodes; - -import java.util.*; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; - -import org.openide.nodes.*; -import org.openoffice.netbeans.modules.office.actions.ParcelDescriptorParserCookie; - -/** List of children of a containing node. - * Remember to document what your permitted keys are! - */ -public class ParcelDescriptorChildren extends Children.Keys implements - ChangeListener { - - private ParcelDescriptorParserCookie parserCookie = null; - - public ParcelDescriptorChildren(ParcelDescriptorParserCookie cookie) { - parserCookie = cookie; - } - - private void refreshKeys() { - NodeList nl; - int len; - - if (parserCookie == null || - (nl = parserCookie.getScriptElements()) == null || - (len = nl.getLength()) == 0) { - setKeys(Collections.EMPTY_SET); - return; - } - - ArrayList keys = new ArrayList(len); - - for (int i = 0; i < len; i++) - keys.add(nl.item(i)); - - setKeys(keys); - } - - protected void addNotify() { - super.addNotify(); - parserCookie.addChangeListener(this); - refreshKeys(); - } - - protected void removeNotify() { - super.removeNotify(); - parserCookie.removeChangeListener(this); - setKeys(Collections.EMPTY_SET); - } - - protected Node[] createNodes(Object key) { - Element el = (Element)key; - System.out.println("element is: " + el); - return new Node[] {new ScriptNode(el)}; - } - - public void stateChanged(ChangeEvent e) { - refreshKeys(); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java deleted file mode 100644 index 861a4a4f1909..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.nodes; - -import org.w3c.dom.*; - -import org.openide.actions.*; -import org.openide.nodes.*; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.actions.SystemAction; - -/** A simple node with no children. - */ -public class ScriptNode extends AbstractNode { - private Element element; - private static final String LOGICAL_NAME = "logicalname"; - private static final String LANGUAGE_NAME = "languagename"; - - public ScriptNode(Element element) { - super(Children.LEAF); - this.element = element; - init(); - } - - private void init() { - setIconBase("/org/openoffice/netbeans/modules/office/resources/OfficeIcon"); - setDefaultAction(SystemAction.get(PropertiesAction.class)); - - NodeList nl = element.getElementsByTagName(LOGICAL_NAME); - Element nameElement = (Element)nl.item(0); - - String name = nameElement.getAttribute("value"); - setName(name); - setDisplayName(name.substring(name.lastIndexOf('.') + 1)); - setShortDescription(name); - } - - protected SystemAction[] createActions() { - return new SystemAction[] { - SystemAction.get(ToolsAction.class), - null, - SystemAction.get(PropertiesAction.class), - }; - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - // RECOMMENDED - handle cloning specially (so as not to invoke the overhead of FilterNode): - /* - public Node cloneNode() { - // Try to pass in similar constructor params to what you originally got: - return new ScriptNode(); - } - */ - - protected Sheet createSheet() { - Sheet sheet = super.createSheet(); - Sheet.Set props = sheet.get(Sheet.PROPERTIES); - - if (props == null) { - props = Sheet.createPropertiesSet(); - sheet.put(props); - } - - org.openide.nodes.Node.Property prop = null; - - if ((prop = getStringProperty(LOGICAL_NAME)) != null) - props.put(prop); - - if ((prop = getStringProperty(LANGUAGE_NAME)) != null) - props.put(prop); - - return sheet; - } - - private org.openide.nodes.Node.Property getStringProperty(String name) { - NodeList nl = element.getElementsByTagName(name); - - if (nl.getLength() != 1) - return null; - - Element nameElement = (Element)nl.item(0); - String value = nameElement.getAttribute("value"); - - return new StringProperty(this, name, value); - } - - private class StringProperty extends PropertySupport.ReadOnly { - private String name, value; - private ScriptNode sn; - - public StringProperty(ScriptNode sn, String name, String value) { - super(value, String.class, name, - "The name of the java language method for this script"); - this.sn = sn; - this.name = name; - this.value = value; - } - - public Object getValue() { - return value; - } - - } - - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/options/Bundle.properties deleted file mode 100644 index 3c3795df9b96..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/Bundle.properties +++ /dev/null @@ -1,31 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# -# Options API -# x-no-translate -LBL_settings=Office Settings -PROP_OfficeDirectory=Path to Office installation -HINT_OfficeDirectory=Path to the Office installation - -HINT_WarnBeforeDocDeploy=Pop up a dialog before deploying to a document -PROP_WarnBeforeDocDeploy=Pop up a dialog before deploying to a document - -HINT_WarnAfterDirDeploy=Pop up a dialog after deploying to a directory -PROP_WarnAfterDirDeploy=Pop up a dialog after deploying to a directory - -HINT_WarnBeforeMount=Warn before mounting Office Scripting Framework support jar -PROP_WarnBeforeMount=Warn before mounting Office Scripting Framework support jar diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java deleted file mode 100644 index 4a917987b1f6..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.options; - -import java.util.Hashtable; -import java.util.Enumeration; -import java.io.File; -import java.io.IOException; - -import org.openide.options.SystemOption; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; - -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.idesupport.OfficeInstallation; - -/** Options for something or other. - */ -public class OfficeSettings extends SystemOption { - - public static final String OFFICE_DIRECTORY = "OfficeDirectory"; - public static final String WARN_BEFORE_DOC_DEPLOY = "WarnBeforeDocDeploy"; - public static final String WARN_BEFORE_PARCEL_DELETE = "WarnBeforeParcelDelete"; - public static final String WARN_AFTER_DIR_DEPLOY = "WarnAfterDirDeploy"; - public static final String WARN_BEFORE_MOUNT = "WarnBeforeMount"; - - protected void initialize() { - super.initialize(); - - setWarnBeforeDocDeploy(true); - setWarnBeforeParcelDelete(true); - setWarnAfterDirDeploy(true); - setWarnBeforeMount(true); - - if (getOfficeDirectory() == null) { - SVersionRCFile sversion = SVersionRCFile.createInstance(); - - try { - Enumeration enumeration = sversion.getVersions(); - OfficeInstallation oi; - - while (enumeration.hasMoreElements()) { - oi = (OfficeInstallation)enumeration.nextElement(); - setOfficeDirectory(oi); - return; - } - } catch (IOException ioe) { - } - } - } - - public String displayName() { - return "Office Settings"; - } - - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - public static OfficeSettings getDefault() { - return (OfficeSettings)findObject(OfficeSettings.class, true); - } - - public OfficeInstallation getOfficeDirectory() { - return (OfficeInstallation)getProperty(OFFICE_DIRECTORY); - } - - public void setOfficeDirectory(OfficeInstallation oi) { - putProperty(OFFICE_DIRECTORY, oi, true); - } - - public boolean getWarnBeforeDocDeploy() { - return ((Boolean)getProperty(WARN_BEFORE_DOC_DEPLOY)).booleanValue(); - } - - public void setWarnBeforeDocDeploy(boolean value) { - putProperty(WARN_BEFORE_DOC_DEPLOY, Boolean.valueOf(value), true); - } - - public boolean getWarnBeforeParcelDelete() { - return ((Boolean)getProperty(WARN_BEFORE_PARCEL_DELETE)).booleanValue(); - } - - public void setWarnBeforeParcelDelete(boolean value) { - putProperty(WARN_BEFORE_PARCEL_DELETE, Boolean.valueOf(value), true); - } - - public boolean getWarnAfterDirDeploy() { - return ((Boolean)getProperty(WARN_AFTER_DIR_DEPLOY)).booleanValue(); - } - - public void setWarnAfterDirDeploy(boolean value) { - putProperty(WARN_AFTER_DIR_DEPLOY, Boolean.valueOf(value), true); - } - - public boolean getWarnBeforeMount() { - return ((Boolean)getProperty(WARN_BEFORE_MOUNT)).booleanValue(); - } - - public void setWarnBeforeMount(boolean value) { - putProperty(WARN_BEFORE_MOUNT, Boolean.valueOf(value), true); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsBeanInfo.java b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsBeanInfo.java deleted file mode 100644 index a811ab855fd5..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsBeanInfo.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.options; - -import java.awt.Image; -import java.awt.Component; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; -import java.beans.*; - -import org.openide.ErrorManager; -import org.openide.util.NbBundle; -import org.openide.util.Utilities; - -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.netbeans.modules.office.wizard.SelectPathPanel; - -/** Description of {@link OfficeSettings}. - */ -public class OfficeSettingsBeanInfo extends SimpleBeanInfo { - - public PropertyDescriptor[] getPropertyDescriptors() { - try { - PropertyDescriptor[] props = new PropertyDescriptor[] { - new PropertyDescriptor(OfficeSettings.OFFICE_DIRECTORY, - OfficeSettings.class, - "get" + OfficeSettings.OFFICE_DIRECTORY, - "set" + OfficeSettings.OFFICE_DIRECTORY), - new PropertyDescriptor(OfficeSettings.WARN_BEFORE_DOC_DEPLOY, - OfficeSettings.class, - "get" + OfficeSettings.WARN_BEFORE_DOC_DEPLOY, - "set" + OfficeSettings.WARN_BEFORE_DOC_DEPLOY), - new PropertyDescriptor(OfficeSettings.WARN_BEFORE_PARCEL_DELETE, - OfficeSettings.class, - "get" + OfficeSettings.WARN_BEFORE_PARCEL_DELETE, - "set" + OfficeSettings.WARN_BEFORE_PARCEL_DELETE), - new PropertyDescriptor(OfficeSettings.WARN_AFTER_DIR_DEPLOY, - OfficeSettings.class, - "get" + OfficeSettings.WARN_AFTER_DIR_DEPLOY, - "set" + OfficeSettings.WARN_AFTER_DIR_DEPLOY), - new PropertyDescriptor(OfficeSettings.WARN_BEFORE_MOUNT, - OfficeSettings.class, - "get" + OfficeSettings.WARN_BEFORE_MOUNT, - "set" + OfficeSettings.WARN_BEFORE_MOUNT) - }; - - props[0].setDisplayName(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "PROP_OfficeDirectory")); - props[0].setShortDescription(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "HINT_OfficeDirectory")); - props[0].setPropertyEditorClass(OfficeDirectoryEditor.class); - - props[1].setDisplayName(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "PROP_WarnBeforeDocDeploy")); - props[1].setShortDescription(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "HINT_WarnBeforeDocDeploy")); - props[1].setHidden(true); - - props[2].setDisplayName(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "PROP_WarnAfterDirDeploy")); - props[2].setShortDescription(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "HINT_WarnAfterDirDeploy")); - props[2].setHidden(true); - - props[3].setDisplayName(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "PROP_WarnBeforeMount")); - props[3].setShortDescription(NbBundle.getMessage( - OfficeSettingsBeanInfo.class, "HINT_WarnBeforeMount")); - props[3].setHidden(true); - - return props; - } catch (IntrospectionException ie) { - ErrorManager.getDefault().notify(ie); - return null; - } - } - - public Image getIcon(int type) { - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { - return Utilities.loadImage("/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon.gif"); - } else { - return Utilities.loadImage("/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon32.gif"); - } - } - - public static class OfficeDirectoryEditor extends PropertyEditorSupport - implements ChangeListener { - - private SelectPathPanel panel; - - public String getAsText() { - return ((OfficeInstallation)getValue()).getPath(); - } - - public void setAsText(String path) { - OfficeInstallation oi = new OfficeInstallation(path); - - if (!oi.supportsFramework()) - throw new IllegalArgumentException(path + - " is not a valid Office install"); - else - setValue(oi); - } - - public Component getCustomEditor() { - panel = new SelectPathPanel(); - panel.addChangeListener(this); - return panel.getComponent(); - } - - public boolean supportsCustomEditor() { - return true; - } - - public void stateChanged(ChangeEvent evt) { - setValue(panel.getSelectedPath()); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon.gif b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon.gif Binary files differdeleted file mode 100644 index 9bed8526705b..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon32.gif b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon32.gif Binary files differdeleted file mode 100644 index 65bfc82bc25f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettingsIcon32.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.html b/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.html deleted file mode 100644 index 16094bba5c8c..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> - -<HTML> - <HEAD> - <TITLE></TITLE> - </HEAD> - <BODY> - <P> -This wizard will let you mount the Office Application scripts directory - </BODY> -</HTML> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.settings b/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.settings deleted file mode 100644 index b682273020b3..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/AppStorage.settings +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd"> -<settings version="1.0"> - <module name="org.openoffice.netbeans.modules.office/1"/> - <instanceof class="org.openide.filesystems.FileSystem"/> - <instance class="org.netbeans.core.ExLocalFileSystem"/> -</settings> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/resources/Bundle.properties deleted file mode 100644 index 316c1bb4217a..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/Bundle.properties +++ /dev/null @@ -1,41 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# -# x-no-translate -Templates/OfficeScripting=Office Scripting -Templates/OfficeScripting/parcel.xml=Script Parcel Descriptor -Services/MIMEResolver/org-netbeans-modules-office-mime-resolver.xml=Script Parcel Descriptor File -Templates=Templates -Templates/OfficeScripting/HelloWorld=Hello World Example Script - -Templates/Mount/org-openoffice-netbeans-modules-office-resources-AppStorage.settings=Office Application Scripts -Templates/Mount/org-openoffice-netbeans-modules-office-resources-OpenOfficeDocFileSystem.settings=OpenOffice.org document - -UI/Services/IDEConfiguration/ServerAndExternalToolSettings/org-openoffice-netbeans-modules-office-options-OfficeSettings.instance=Office Settings - -Services/org-openoffice-netbeans-modules-office-resources-OfficeSettings.settings=Office Settings - -PROP_OfficeDirectory=Office Installation Directory - -HINT_OfficeDirectory=Path to directory where Office is installed - -Templates/OfficeScripting/Parcel=Parcel Recipe -Templates/OfficeScripting/EmptyScript=Empty Script -Templates/OfficeScripting/EmptyScript/Empty.java=Java -Templates/OfficeScripting/EmptyScript/Empty.bsh=BeanShell - -Menu/Help/office-scripting.url=&Office Scripting Framework Site diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/EmptyParcel.html b/scripting/java/org/openoffice/netbeans/modules/office/resources/EmptyParcel.html deleted file mode 100644 index ab350afcbc04..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/EmptyParcel.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> - -<HTML> - <HEAD> - <TITLE></TITLE> - </HEAD> - <BODY> - <P> -This allows you to create an Empty Office Script. - </BODY> -</HTML> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif b/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif Binary files differdeleted file mode 100644 index ec7507ef9e54..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon32.gif b/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon32.gif Binary files differdeleted file mode 100644 index 94fdab1eba0c..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeIcon32.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeSettings.settings b/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeSettings.settings deleted file mode 100644 index df98da11659b..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OfficeSettings.settings +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd"> -<settings version="1.0"> - <module name="org.openoffice.netbeans.modules.office"/> - <instanceof class="org.openide.util.SharedClassObject"/> - <instanceof class="org.openide.util.SystemOption"/> - <instanceof class="org.openoffice.netbeans.modules.office.options.OfficeSettings"/> - <instance class="org.openoffice.netbeans.modules.office.options.OfficeSettings"/> -</settings> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.html b/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.html deleted file mode 100644 index c5b1d34543a5..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> - -<HTML> - <HEAD> - <TITLE></TITLE> - </HEAD> - <BODY> - <P> -This allows you to mount OpenOffice.org document. - </BODY> -</HTML> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.settings b/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.settings deleted file mode 100644 index 32a5bd490be1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.settings +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd"> -<settings version="1.0"> - <module name="org.openoffice.netbeans.modules.office/1"/> - <instanceof class="org.openide.filesystems.FileSystem"/> - <instance class="org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem"/> -</settings> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon.png b/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon.png Binary files differdeleted file mode 100644 index a441019346f9..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon.png +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon32.png b/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon32.png Binary files differdeleted file mode 100644 index 1b2ee21e6d9c..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon32.png +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/ParcelIcon.gif b/scripting/java/org/openoffice/netbeans/modules/office/resources/ParcelIcon.gif Binary files differdeleted file mode 100644 index a889c2614edf..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/ParcelIcon.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcel.html b/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcel.html deleted file mode 100644 index fa0fe2517bad..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcel.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> - -<HTML> - <HEAD> - <TITLE></TITLE> - </HEAD> - <BODY> - <P> -This allows you to create a Hello World example Office Script. - </BODY> -</HTML> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcelDescriptor.html b/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcelDescriptor.html deleted file mode 100644 index 1945697a37f3..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/ScriptParcelDescriptor.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> - -<HTML> - <HEAD> - <TITLE></TITLE> - </HEAD> - <BODY> - <P> -This allows you to create a Office Script Parcel Descriptor File. - </BODY> -</HTML> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/layer.xml b/scripting/java/org/openoffice/netbeans/modules/office/resources/layer.xml deleted file mode 100644 index c95a879ec4c7..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/layer.xml +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> -<filesystem> - <folder name="Templates"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - - <folder name="OfficeScripting"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <folder name="Parcel"> - <attr boolvalue="true" name="template"/> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif"/> - <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/EmptyParcel.html"/> - <attr name="templateWizardIterator" newvalue="org.openoffice.netbeans.modules.office.wizard.ParcelContentsIterator"/> - <folder name="Contents"> - <file name="parcel-descriptor.xml" url="templates/EmptyParcelDescriptor.xml_"/> - <!-- file name="Empty.java" url="templates/Empty.java_"/ --> - </folder> - </folder> - <folder name="EmptyScript"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <file name="Empty.java" url="templates/Empty.java_"> - <attr name="template" boolvalue="true"/> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="templateWizardIterator" newvalue="org.openoffice.netbeans.modules.office.wizard.JavaScriptIterator"/> - </file> - <file name="Empty.bsh" url="templates/Empty.bsh_"> - <attr name="template" boolvalue="true"/> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - </file> - </folder> - </folder> - <attr boolvalue="true" name="Ant/OfficeScripting"/> - <attr boolvalue="true" name="OfficeScripting/Other"/> - - <!-- OpenOfficeDoc FileSystem BEGIN: --> - <!-- Uncomment to enable writable mounting of Office Documents - <folder name="Mount"> - <attr name="org-netbeans-core-ExLocalFileSystem.settings/org-openoffice-netbeans-modules-office-resources-OpenOfficeDocFileSystem.settings" - boolvalue="true"/> - <attr name="org-openoffice-netbeans-modules-office-resources-OpenOfficeDocFileSystem.settings/VCS" - boolvalue="true"/> - - <file name="org-openoffice-netbeans-modules-office-resources-OpenOfficeDocFileSystem.settings" - url="OpenOfficeDocFileSystem.settings"> - <attr name="template" - boolvalue="true"/> - <attr name="SystemFileSystem.localizingBundle" - stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="SystemFileSystem.icon" - urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystemIcon.png"/> - <attr name="templateWizardIterator" - methodvalue="org.netbeans.core.ui.MountNode.iterator"/> - <attr name="templateWizardURL" - urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/OpenOfficeDocFileSystem.html"/> - </file> - </folder> - --> - <!-- OpenOfficeDoc FileSystem END: --> - </folder> - - <folder name="Services"> - <folder name="MIMEResolver"> - <file name="org-netbeans-modules-office-mime-resolver.xml" url="mime-resolver.xml"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif"/> - </file> - </folder> - <file name="org-openoffice-netbeans-modules-office-resources-OfficeSettings.settings" url="OfficeSettings.settings"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/OfficeIcon.gif"/> - </file> - </folder> - - <folder name="Menu"> - <folder name="Help"> - <attr name="submit-feedback-link.url/office-scripting.url" boolvalue="true"/> - <file name="office-scripting.url" url="office-scripting.url"> - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.netbeans.modules.office.resources.Bundle"/> - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/netbeans/modules/office/resources/webLink.gif"/> - </file> - </folder> - </folder> - - <folder name="UI"> - <folder name="Services"> - <folder name="IDEConfiguration"> - <folder name="ServerAndExternalToolSettings"> - <file name="org-openoffice-netbeans-modules-office-resources-OfficeSettings.shadow"> - <attr name="originalFile" stringvalue="Services/org-openoffice-netbeans-modules-office-resources-OfficeSettings.settings"/> - </file> - </folder> - </folder> - </folder> - </folder> - - <attr boolvalue="true" name="Templates/Services"/> -</filesystem> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/mime-resolver.xml b/scripting/java/org/openoffice/netbeans/modules/office/resources/mime-resolver.xml deleted file mode 100644 index 9e5bfe6be843..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/mime-resolver.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd"> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> -<MIME-resolver> - - <!-- Resolve according to root element: --> - <file> - <ext name="xml"/> - <resolver mime="text/x-parcel+xml"> - <xml-rule> - <element name="parcel"/> - </xml-rule> - </resolver> - </file> - -</MIME-resolver> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/office-scripting.url b/scripting/java/org/openoffice/netbeans/modules/office/resources/office-scripting.url deleted file mode 100644 index f7be83c0eae4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/office-scripting.url +++ /dev/null @@ -1 +0,0 @@ -http://framework.openoffice.org/scripting/netbeans-devguide.html diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.bsh_ b/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.bsh_ deleted file mode 100644 index e8d79f1c46ef..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.bsh_ +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -// If using XComponentContext need to uncomment import directive below: -// import com.sun.star.uno.XComponentContext; - -// If using XDesktop need to uncomment import directive below: -// import com.sun.star.frame.XDesktop; - -// If using XComponent need to uncomment import directive below: -// import com.sun.star.frame.XModel; - -import drafts.com.sun.star.script.framework.runtime.XScriptContext; - -/* Use the XScriptContext variable "context" to access the document for - which this script was invoked. This variable will be initialised - automatically by the Scripting Framework when the script is invoked. - - Methods available are: - - context.getDocument() returns XModel - context.getDesktop() returns XDesktop - context.getComponentContext() returns XComponentContext -*/ - -// Uncomment to get the current document model -// xmodel = context.getDocument(); diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.java_ b/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.java_ deleted file mode 100644 index 33ebd132c3d6..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/Empty.java_ +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -// If using XComponentContext need to uncomment import directive below: -// import com.sun.star.uno.XComponentContext; - -// If using XDesktop need to uncomment import directive below: -// import com.sun.star.frame.XDesktop; - -// If using XComponent need to uncomment import directive below: -// import com.sun.star.frame.XModel; - -import drafts.com.sun.star.script.framework.runtime.XScriptContext; - -public class Empty { - - public void doMethod(XScriptContext xSc) { - - /* Methods available from XScriptContext: - xSc.getDocument() returns XModel - xSc.getDesktop() returns XDesktop - xSc.getComponentContext() returns XComponentContext - */ - - // Uncomment to get the current document as a component - // XComponent xcomponent = xSc.getDocument(); - - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/EmptyParcelDescriptor.xml_ b/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/EmptyParcelDescriptor.xml_ deleted file mode 100644 index c414df89a170..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/EmptyParcelDescriptor.xml_ +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<parcel language="Java" xmlns:parcel="scripting.dtd"> -</parcel> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/HelloWorld.java_ b/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/HelloWorld.java_ deleted file mode 100644 index e9eba2ef4140..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/HelloWorld.java_ +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -// If using XMultiServiceFactory need to uncomment import directive below: -//import com.sun.star.lang.XMultiServiceFactory; - -// If using XDesktop need to uncomment import directive below: -//import com.sun.star.frame.XDesktop; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.*; -import com.sun.star.text.*; - -import drafts.com.sun.star.script.framework.runtime.XScriptContext; - - -public class HelloWorld { - - public void printHello(XScriptContext xSc) { - - /* Methods available from XScriptContext: - xSc.getDocument() returns XModel - xSc.getDesktop() returns XDesktop - xSc.getMultiComponentFactory() returns XMultiComponentFactory - */ - - // Getting the current document as a component - XComponent xcomponent = xSc.getDocument(); - - // Getting the text document object - XTextDocument xtextdocument = (XTextDocument) UnoRuntime.queryInterface( -XTextDocument.class, xcomponent); - - //Getting the text object - XText oText = xtextdocument.getText(); - - //Create a cursor object - XTextCursor oCursor = oText.createTextCursor(); - - // Print out Hello World - oText.insertString( oCursor, "**** HELLO ****", false ); - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/ParcelDescriptor.xml_ b/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/ParcelDescriptor.xml_ deleted file mode 100644 index 81ffce04e37d..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/templates/ParcelDescriptor.xml_ +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<parcel> - <script language="Java" deploymentdir="java/HelloWorld"> - <logicalname value="HelloWorld.printHello"/> - <languagename value="HelloWorld.printHello" location="HelloWorld.class"/> - </script> -</parcel> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif b/scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif Binary files differdeleted file mode 100644 index ae40f9af595f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/resources/webLink.gif +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java deleted file mode 100644 index 9c6c33900383..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.File; -import java.io.IOException; -import java.beans.PropertyVetoException; - -import org.openide.filesystems.Repository; -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.JarFileSystem; - -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -public class FrameworkJarChecker { - - public static void mountDependencies() { - String unoilPath = SVersionRCFile.getPathForUnoil( - OfficeSettings.getDefault().getOfficeDirectory().getPath()); - - if (unoilPath == null) - return; - - File unoilFile = new File(unoilPath + File.separator + "unoil.jar"); - JarFileSystem jfs = new JarFileSystem(); - - try { - jfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - FileSystem result; - - try { - result = - Repository.getDefault().findFileSystem(jfs.getSystemName()); - } catch (Exception exp) { - result = null; - } finally { - jfs.removeNotify(); - } - - if (result == null) { - JarFileSystem newjfs = new JarFileSystem(); - - try { - newjfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - Repository.getDefault().addFileSystem(newjfs); - newjfs.setHidden(true); - } - } - - public static void unmountDependencies() { - String unoilPath = SVersionRCFile.getPathForUnoil( - OfficeSettings.getDefault().getOfficeDirectory().getPath()); - - if (unoilPath == null) - return; - - File unoilFile = new File(unoilPath + File.separator + "unoil.jar"); - JarFileSystem jfs = new JarFileSystem(); - - try { - jfs.setJarFile(unoilFile); - } catch (IOException ioe) { - return; - } catch (PropertyVetoException pve) { - return; - } - - FileSystem result; - - try { - result = - Repository.getDefault().findFileSystem(jfs.getSystemName()); - - if (result != null) - Repository.getDefault().removeFileSystem(result); - } catch (Exception exp) { - } - } - - private static void warnBeforeMount() { - OfficeSettings settings = OfficeSettings.getDefault(); - - if (!settings.getWarnBeforeMount()) - return; - - String message = "The Office Scripting Framework support jar file " + - "is not mounted, so Office scripts will not compile. NetBeans " + - "is going to mount this jar file automatically."; - - String prompt = "Show this message in future."; - - NagDialog warning = NagDialog.createInformationDialog( - message, prompt, true); - - if (!warning.getState()) { - settings.setWarnBeforeMount(false); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java deleted file mode 100644 index 67e6202c7789..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/ManifestParser.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.IOException; -import java.io.File; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -import org.openide.xml.XMLUtil; - -import com.sun.star.script.framework.container.XMLParser; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.idesupport.OfficeInstallation; - -public class ManifestParser implements XMLParser { - - private static ManifestParser parser = null; - - private ManifestParser() { - } - - public static synchronized ManifestParser getManifestParser() { - if (parser == null) { - parser = new ManifestParser(); - } - - return parser; - } - - public Document parse(InputStream inputStream) { - InputSource is; - Document result = null; - - try { - OfficeInstallation oi = OfficeSettings.getDefault().getOfficeDirectory(); - String id = oi.getURL("share/dtd/officedocument/1_0/"); - - is = new InputSource(inputStream); - is.setSystemId(id); - - result = XMLUtil.parse(is, false, false, null, null); - } catch (IOException ioe) { - System.out.println("IO Error parsing stream."); - return null; - } catch (SAXParseException spe) { - System.out.println("Sax Error parsing stream: " + spe.getMessage()); - System.out.println("\tPublicId: " + spe.getPublicId()); - System.out.println("\tSystemId: " + spe.getSystemId()); - return null; - } catch (SAXException se) { - System.out.println("Sax Error parsing stream: " + se.getMessage()); - return null; - } - - return result; - } - - public void write(Document doc, OutputStream out) throws IOException { - XMLUtil.write(doc, out, ""); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java deleted file mode 100644 index f6f9ee148e0e..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.awt.BorderLayout; -import java.awt.Dimension; - -import javax.swing.JPanel; -import javax.swing.JOptionPane; -import javax.swing.JCheckBox; -import javax.swing.border.EmptyBorder; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; - -public class NagDialog { - - private NotifyDescriptor descriptor; - private JPanel panel; - private JCheckBox checkbox; - - private NagDialog(String message, String prompt, boolean initialState, - int type) { - initUI(message, prompt, initialState, type); - } - - public static NagDialog createInformationDialog( - String message, String prompt, boolean initialState) { - NagDialog result = new NagDialog( - message, prompt, initialState, JOptionPane.INFORMATION_MESSAGE); - - result.setDescriptor(new NotifyDescriptor.Message(result.getPanel(), - NotifyDescriptor.PLAIN_MESSAGE)); - - return result; - } - - public static NagDialog createConfirmationDialog( - String message, String prompt, boolean initialState) { - NagDialog result = new NagDialog( - message, prompt, initialState, JOptionPane.QUESTION_MESSAGE); - - result.setDescriptor(new NotifyDescriptor.Confirmation( - result.getPanel(), NotifyDescriptor.OK_CANCEL_OPTION, - NotifyDescriptor.PLAIN_MESSAGE)); - - return result; - } - - public boolean show() { - TopManager.getDefault().notify(descriptor); - - return (descriptor.getValue() == NotifyDescriptor.OK_OPTION); - } - - public boolean getState() { - return checkbox.isSelected(); - } - - private JPanel getPanel() { - return this.panel; - } - - private void setDescriptor(NotifyDescriptor descriptor) { - this.descriptor = descriptor; - } - - private void initUI(String message, String prompt, boolean initialState, - int type) { - - this.panel = new JPanel(); - JOptionPane optionPane = new JOptionPane(message, type, 0, null, - new Object[0], null) { - public int getMaxCharactersPerLineCount() { - return 100; - } - }; - optionPane.setUI(new javax.swing.plaf.basic.BasicOptionPaneUI() { - public Dimension getMinimumOptionPaneSize() { - if (minimumSize == null) { - return new Dimension(MinimumWidth, 50); - } - - return new Dimension(minimumSize.width, 50); - } - }); - optionPane.setWantsInput(false); - - JPanel checkPanel = new JPanel(); - checkbox = new JCheckBox(prompt, initialState); - checkPanel.setLayout(new BorderLayout()); - checkPanel.setBorder(new EmptyBorder(0, 20, 0, 0)); - checkPanel.add(checkbox, BorderLayout.WEST); - - this.panel.setLayout(new BorderLayout()); - this.panel.add(optionPane, BorderLayout.CENTER); - this.panel.add(checkPanel, BorderLayout.SOUTH); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java deleted file mode 100644 index a4d917e2552b..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import org.openide.TopManager; -import org.openide.WizardDescriptor; -import org.openide.NotifyDescriptor; -import org.openide.modules.ModuleInstall; - -import com.sun.star.script.framework.container.XMLParserFactory; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.netbeans.modules.office.wizard.InstallationPathDescriptor; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -public class OfficeModule extends ModuleInstall { - - private static final long serialVersionUID = -8499324854301243852L; - - public void installed() { - WizardDescriptor wiz = new InstallationPathDescriptor(); - TopManager.getDefault().createDialog(wiz).show(); - - if (wiz.getValue() == NotifyDescriptor.OK_OPTION) { - OfficeInstallation oi = (OfficeInstallation) - wiz.getProperty(InstallationPathDescriptor.PROP_INSTALLPATH); - - OfficeSettings settings = OfficeSettings.getDefault(); - settings.setOfficeDirectory(oi); - } - - FrameworkJarChecker.mountDependencies(); - XMLParserFactory.setParser(ManifestParser.getManifestParser()); - } - - public void restored() { - FrameworkJarChecker.mountDependencies(); - XMLParserFactory.setParser(ManifestParser.getManifestParser()); - } - - public boolean closing() { - FrameworkJarChecker.unmountDependencies(); - return true; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java deleted file mode 100644 index f79368f6f495..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/PackageRemover.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; - -import org.openoffice.idesupport.zip.ParcelZipper; - -public class PackageRemover { - private PackageRemover() { - } - - public static void removeDeclaration(File source) throws IOException { - File tmp = new File(source.getAbsolutePath() + ".tmp"); - - BufferedReader in = new BufferedReader(new FileReader(source)); - BufferedWriter out = new BufferedWriter(new FileWriter(tmp)); - - try { - String line; - - while ((line = in.readLine()) != null) { - if (line.startsWith("package")) { - String newDeclaration = evaluate(line); - - if (newDeclaration != null) { - out.write(newDeclaration, 0, newDeclaration.length()); - out.newLine(); - } - } else { - out.write(line, 0, line.length()); - out.newLine(); - } - } - } finally { - if (in != null) { - in.close(); - } - - if (out != null) { - out.close(); - } - } - - if (!source.delete()) { - tmp.delete(); - throw new IOException("Could not overwrite " + source); - } else { - tmp.renameTo(source); - } - } - - public static String evaluate(String line) { - - int idx = line.indexOf(ParcelZipper.CONTENTS_DIRNAME); - - if (idx == -1) - return line; - - idx = idx + ParcelZipper.CONTENTS_DIRNAME.length(); - - if (line.charAt(idx) == '.') - return "package " + line.substring(idx + 1);; - - return null; - } - - public static void main(String[] args) { - File source = new File(args[0]); - - try { - removeDeclaration(source); - } catch (IOException ioe) { - ioe.printStackTrace(); - } - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java deleted file mode 100644 index 4163ea1ea99f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/ZipMounter.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.utils; - -import java.io.*; -import java.util.zip.*; -import java.beans.PropertyVetoException; - -import org.openide.filesystems.FileSystem; -import org.openide.filesystems.Repository; - -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; - -public class ZipMounter { - private static ZipMounter mounter = null; - - private ZipMounter() { - } - - public static synchronized ZipMounter getZipMounter() { - if (mounter == null) - mounter = new ZipMounter(); - - return mounter; - } - - public void mountZipFile(File zipfile) - throws IOException, PropertyVetoException { - if (zipfile != null) { - addDocumentToRepository(zipfile, true); - } - } - - private FileSystem addDocumentToRepository(File rootFile, boolean writeable) - throws IOException, PropertyVetoException { - Repository repo = Repository.getDefault(); - OpenOfficeDocFileSystem oofs; - oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile); - - if (oofs != null) - repo.removeFileSystem(oofs); - - oofs = new OpenOfficeDocFileSystem(); - oofs.setDocument(rootFile); - repo.addFileSystem(oofs); - return oofs; - } - - /** @return FileSystem which has given jar file as its root or - * null if no such file system could be found in repository */ - private FileSystem getMountedDocument(File rootFile) { - if (rootFile == null) - return null; - - FileSystem oofs = null; - - try { - oofs = Repository.getDefault().findFileSystem( - OpenOfficeDocFileSystem.computeSystemName(rootFile)); - } catch (Exception exp) { - } - - return oofs; - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties b/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties deleted file mode 100644 index 7474954ee059..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle.properties +++ /dev/null @@ -1,44 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# -# Window System API -# x-no-translate - -# TopComponent -LBL_component_name=<name of component> -#LBL_mode_name=<name of mode> -#LBL_workspace_name=<name of workspace> - -# WizardDescriptor -# Dialog title: -TITLE_wizard=Select Path to OpenOffice.org Installation - -# WizardDescriptor.Iterator -# Label the sequence #. Appears at top of pane: -# e.g. "Panel Name (1 of 3)" -TITLE_x_of_y={0} of {1} -# Provide list of steps to show in left pane: -#LBL_step_1=Select First Thing -#LBL_step_2=Configure Details - -# WizardDescriptor.Panel -# Will appear in dialog title; see above -TITLE_ParcelPropertiesVisualPanel=Parcel Recipe Properties -TITLE_SelectPathVisualPanel=Path to OpenOffice.org - -# CallableSystemAction -LBL_Action=Run Action diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties b/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/Bundle_en_US.properties +++ /dev/null diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java deleted file mode 100644 index f75873dade3f..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathDescriptor.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Dimension; -import java.awt.Toolkit; -import java.net.URL; -import java.net.MalformedURLException; - -import org.openide.TopManager; -import org.openide.WizardDescriptor; -import org.openide.util.NbBundle; - -/** A wizard descriptor. - */ -public class InstallationPathDescriptor extends WizardDescriptor { - - private final InstallationPathIterator iterator; - public static final String PROP_INSTALLPATH = "INSTALLPATH"; - - /** Make a descriptor suited to use InstallationPathIterator. - * Sets up various wizard properties to follow recommended - * style guidelines. - */ - public InstallationPathDescriptor() { - this(new InstallationPathIterator()); - } - private InstallationPathDescriptor(InstallationPathIterator iterator) { - super(iterator); - this.iterator = iterator; - // Set title for the dialog: - setTitle(NbBundle.getMessage(InstallationPathDescriptor.class, "TITLE_wizard")); - // Make the left pane appear: - putProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); // NOI18N - // Make the left pane show list of steps etc.: - putProperty("WizardPanel_contentDisplayed", Boolean.TRUE); // NOI18N - } - - // Called when user moves forward or backward etc.: - protected void updateState() { - super.updateState(); - putProperty("WizardPanel_contentData", iterator.getSteps()); // NOI18N - putProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(iterator.getIndex())); // NOI18N - } - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java deleted file mode 100644 index fafd40165978..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/InstallationPathIterator.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.util.NbBundle; - -/** A wizard iterator (sequence of panels). - * Used to create a wizard. Create one or more - * panels from template as needed too. - */ -public class InstallationPathIterator implements WizardDescriptor.Iterator { - - // You should define what panels you want to use here: - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - new SelectPathPanel() - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - "Select OpenOffice.org Installation" - }; - } - - // --- The rest probably does not need to be touched. --- - - // Keep track of the panels and selected panel: - - private transient int index = 0; - // Also package-accessible to descriptor: - protected final int getIndex() { - return index; - } - private transient WizardDescriptor.Panel[] panels = null; - protected final WizardDescriptor.Panel[] getPanels() { - if (panels == null) { - panels = createPanels(); - } - - return panels; - } - - // Also the list of steps in the left pane: - - private transient String[] steps = null; - // Also package-accessible to descriptor: - protected final String[] getSteps() { - if (steps == null) { - steps = createSteps(); - } - - return steps; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return NbBundle.getMessage(InstallationPathIterator.class, "TITLE_x_of_y", - Integer.valueOf(index + 1), Integer.valueOf(getPanels().length)); - } - - public boolean hasNext() { - return index < getPanels().length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return getPanels()[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set<ChangeListener> - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java deleted file mode 100644 index dd602ce1131d..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.JComponent; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.ErrorManager; -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.WizardDescriptor; -import org.openide.cookies.OpenCookie; -import org.openide.cookies.SourceCookie; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.filesystems.*; - -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.loader.ParcelFolder; -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; -import org.openoffice.netbeans.modules.office.utils.PackageRemover; - -/** A template wizard iterator (sequence of panels). - * Used to fill in the second and subsequent panels in the New wizard. - * Associate this to a template inside a layer using the - * Sequence of Panels extra property. - * Create one or more panels from template as needed too. - */ -public class JavaScriptIterator implements TemplateWizard.Iterator { - - - // You should define what panels you want to use here: - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - // keep the default 2nd panel: - wiz.targetChooser(), - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - null, - }; - } - - private DataFolder checkTarget(DataFolder folder) { - FileObject fo = folder.getPrimaryFile(); - - try { - FileSystem fs = fo.getFileSystem(); - - if (fs instanceof OpenOfficeDocFileSystem && fo.isRoot()) { - FileObject scripts = - fo.getFileObject(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - if (scripts == null) - scripts = - fo.createFolder(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - FileObject javafolder = scripts.getFileObject("java"); - - if (javafolder == null) - javafolder = scripts.createFolder("java"); - - DataFolder subfolder = new DataFolder(javafolder); - return subfolder; - } - } catch (IOException ioe) { - /* do nothing, we will just return the folder we were passed in */ - } - - return folder; - } - - public Set instantiate(TemplateWizard wiz) throws IOException { - String name = wiz.getTargetName(); - DataFolder targetFolder = wiz.getTargetFolder(); - targetFolder = checkTarget(targetFolder); - - DataObject template = wiz.getTemplate(); - DataObject result; - - if (name == null) { - // Default name. - result = template.createFromTemplate(targetFolder); - } else { - result = template.createFromTemplate(targetFolder, name); - } - - FileObject tmp = result.getPrimaryFile(); - - if (tmp.getExt().equals("java")) { - try { - PackageRemover.removeDeclaration(FileUtil.toFile(tmp)); - - // IssueZilla 11986 - rename the FileObject - // so the JavaNode is resynchronized - tmp.rename(tmp.lock(), tmp.getName(), tmp.getExt()); - } catch (IOException ioe) { - NotifyDescriptor d = new NotifyDescriptor.Message( - "Error removing package declaration from file: " + - tmp.getNameExt() + - ". You should manually remove this declaration " + - "before building the Parcel Recipe"); - TopManager.getDefault().notify(d); - } - } - - return Collections.singleton(result); - } - - // --- The rest probably does not need to be touched. --- - - private transient int index; - private transient WizardDescriptor.Panel[] panels; - private transient TemplateWizard wiz; - - // You can keep a reference to the TemplateWizard which can - // provide various kinds of useful information such as - // the currently selected target name. - // Also the panels will receive wiz as their "settings" object. - public void initialize(TemplateWizard wiz) { - this.wiz = wiz; - index = 0; - panels = createPanels(); - // Make sure list of steps is accurate. - String[] steps = createSteps(); - - for (int i = 0; i < panels.length; i++) { - Component c = panels[i].getComponent(); - - if (steps[i] == null) { - // Default step name to component name of panel. - // Mainly useful for getting the name of the target - // chooser to appear in the list of steps. - steps[i] = c.getName(); - } - - if (c instanceof JComponent) { // assume Swing components - JComponent jc = (JComponent)c; - // Step #. - jc.putClientProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(i)); // NOI18N - // Step name (actually the whole list for reference). - jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N - } - } - } - public void uninitialize(TemplateWizard wiz) { - this.wiz = null; - panels = null; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return ""; - } - - public boolean hasNext() { - return index < panels.length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return panels[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set<ChangeListener> - public final void addChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java deleted file mode 100644 index 4135724d2010..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.io.File; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Set; -import javax.swing.JComponent; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.TopManager; -import org.openide.NotifyDescriptor; -import org.openide.WizardDescriptor; -import org.openide.cookies.OpenCookie; -import org.openide.cookies.SourceCookie; -import org.openide.loaders.*; -import org.openide.util.NbBundle; -import org.openide.filesystems.*; - -import com.sun.star.script.framework.container.ParcelDescriptor; -import org.openoffice.idesupport.zip.ParcelZipper; -import org.openoffice.netbeans.modules.office.loader.ParcelFolder; -import org.openoffice.netbeans.modules.office.loader.ParcelContentsFolder; -import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem; - -/** A template wizard iterator (sequence of panels). - * Used to fill in the second and subsequent panels in the New wizard. - * Associate this to a template inside a layer using the - * Sequence of Panels extra property. - * Create one or more panels from template as needed too. - */ -public class ParcelContentsIterator implements TemplateWizard.Iterator { - - - // You should define what panels you want to use here: - - public static final String PROP_LANGUAGE = - ParcelFolder.LANGUAGE_ATTRIBUTE; - - protected WizardDescriptor.Panel[] createPanels() { - return new WizardDescriptor.Panel[] { - new ParcelPropertiesPanel(), - }; - } - - // And the list of step names: - - protected String[] createSteps() { - return new String[] { - // null, - "Parcel Properties", - }; - } - - private DataFolder checkTarget(DataFolder folder) { - FileObject fo = folder.getPrimaryFile(); - - try { - FileSystem fs = fo.getFileSystem(); - - if (fs instanceof OpenOfficeDocFileSystem && fo.isRoot()) { - FileObject scripts = - fo.getFileObject(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - if (scripts == null) - scripts = - fo.createFolder(OpenOfficeDocFileSystem.SCRIPTS_ROOT); - - FileObject javafolder = scripts.getFileObject("java"); - - if (javafolder == null) - javafolder = scripts.createFolder("java"); - - DataFolder subfolder = new DataFolder(javafolder); - return subfolder; - } - } catch (IOException ioe) { - /* do nothing, we will just return the folder we were passed in */ - } - - return folder; - } - - public Set instantiate(TemplateWizard wiz) throws IOException { - String name = wiz.getTargetName(); - DataFolder targetFolder = wiz.getTargetFolder(); - targetFolder = checkTarget(targetFolder); - - String language = (String)wiz.getProperty(PROP_LANGUAGE); - - DataObject template = wiz.getTemplate(); - DataObject result; - - if (name == null) { - // Default name. - result = template.createFromTemplate(targetFolder); - } else { - result = template.createFromTemplate(targetFolder, name); - } - - FileObject recipe = result.getPrimaryFile(); - - FileObject contents = - recipe.getFileObject(ParcelZipper.CONTENTS_DIRNAME); - - if (contents != null) { - File f = FileUtil.toFile(contents); - ParcelDescriptor pd = ParcelDescriptor.createParcelDescriptor(f); - pd.setLanguage(language); - pd.write(); - - DataFolder parent = DataFolder.findFolder(contents); - ParcelContentsFolder.createEmptyScript(parent, language); - } - - return Collections.singleton(result); - } - - // --- The rest probably does not need to be touched. --- - - private transient int index; - private transient WizardDescriptor.Panel[] panels; - private transient TemplateWizard wiz; - - // You can keep a reference to the TemplateWizard which can - // provide various kinds of useful information such as - // the currently selected target name. - // Also the panels will receive wiz as their "settings" object. - public void initialize(TemplateWizard wiz) { - this.wiz = wiz; - index = 0; - panels = createPanels(); - // Make sure list of steps is accurate. - String[] steps = createSteps(); - - for (int i = 0; i < panels.length; i++) { - Component c = panels[i].getComponent(); - - if (steps[i] == null) { - // Default step name to component name of panel. - // Mainly useful for getting the name of the target - // chooser to appear in the list of steps. - steps[i] = c.getName(); - } - - if (c instanceof JComponent) { // assume Swing components - JComponent jc = (JComponent)c; - // Step #. - jc.putClientProperty("WizardPanel_contentSelectedIndex", - Integer.valueOf(i)); // NOI18N - // Step name (actually the whole list for reference). - jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N - } - } - } - public void uninitialize(TemplateWizard wiz) { - this.wiz = null; - panels = null; - } - - // --- WizardDescriptor.Iterator METHODS: --- - // Note that this is very similar to WizardDescriptor.Iterator, but with a - // few more options for customization. If you e.g. want to make panels appear - // or disappear dynamically, go ahead. - - public String name() { - return ""; - } - - public boolean hasNext() { - return index < panels.length - 1; - } - public boolean hasPrevious() { - return index > 0; - } - public void nextPanel() { - if (!hasNext()) throw new NoSuchElementException(); - - index++; - } - public void previousPanel() { - if (!hasPrevious()) throw new NoSuchElementException(); - - index--; - } - public WizardDescriptor.Panel current() { - return panels[index]; - } - - // If nothing unusual changes in the middle of the wizard, simply: - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - // If something changes dynamically (besides moving between panels), - // e.g. the number of panels changes in response to user input, then - // uncomment the following and call when needed: - // fireChangeEvent(); - /* - private transient Set listeners = new HashSet(1); // Set<ChangeListener> - public final void addChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized(listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - listeners = new HashSet(1); - } - */ - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java deleted file mode 100644 index aaf3abd5a186..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesPanel.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.net.URL; -import java.net.MalformedURLException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.loaders.TemplateWizard; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; - -/** A single panel descriptor for a wizard. - * You probably want to make a wizard iterator to hold it. - */ -public class ParcelPropertiesPanel implements WizardDescriptor.FinishPanel { - - /** The visual component that displays this panel. - * If you need to access the component from this class, - * just use getComponent(). - */ - private ParcelPropertiesVisualPanel component; - - // Get the visual component for the panel. In this template, the component - // is kept separate. This can be more efficient: if the wizard is created - // but never displayed, or not all panels are displayed, it is better to - // create only those which really need to be visible. - public Component getComponent() { - if (component == null) { - component = new ParcelPropertiesVisualPanel(this); - } - - return component; - } - - public HelpCtx getHelp() { - // Show no Help button for this panel: - return HelpCtx.DEFAULT_HELP; - // If you have context help: - // return new HelpCtx(ParcelPropertiesPanel.class); - } - - public boolean isValid() { - // If it is always OK to press Next or Finish, then: - return true; - // If it depends on some condition (form filled out...), then: - // return someCondition(); - // and when this condition changes (last form field filled in...) then: - // fireChangeEvent(); - // and uncomment the complicated stuff below. - } - - public final void addChangeListener(ChangeListener l) {} - public final void removeChangeListener(ChangeListener l) {} - /* - private final Set listeners = new HashSet(1); // Set<ChangeListener> - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - ChangeEvent ev = new ChangeEvent(this); - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - */ - - public void setName(String name) { - this.name = name; - } - - public void setLanguage(String language) { - this.language = language; - } - - private String language = "Java"; - private String name = null; - - // You can use a settings object to keep track of state. - // Normally the settings object will be the WizardDescriptor, - // so you can use WizardDescriptor.getProperty & putProperty - // to store information entered by the user. - public void readSettings(Object settings) { - } - - public void storeSettings(Object settings) { - TemplateWizard wiz = (TemplateWizard)settings; - wiz.setTargetName(name); - wiz.putProperty(ParcelContentsIterator.PROP_LANGUAGE, language); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form deleted file mode 100644 index 5c22ca6f2fe4..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.form +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> -<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> - <Properties> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[500, 300]"/> - </Property> - </Properties> - <AuxValues> - <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,75,0,0,1,-112"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> - <SubComponents> - <Component class="javax.swing.JLabel" name="jLabel1"> - <Properties> - <Property name="text" type="java.lang.String" value="Parcel Recipe Name"/> - </Properties> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="11" insetsRight="2" anchor="17" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JTextField" name="recipeName"> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="recipeNameActionPerformed"/> - <EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="recipeNameFocusGained"/> - <EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="recipeNameFocusLost"/> - </Events> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="1" gridY="0" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="10" weightX="1.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JLabel" name="jLabel2"> - <Properties> - <Property name="text" type="java.lang.String" value="Initial Script Language"/> - </Properties> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="11" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JComboBox" name="languagesComboBox"> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="languagesComboBoxActionPerformed"/> - </Events> - <AuxValues> - <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CreateCodePre" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CodeGeneration" type="java.lang.Integer" value="0"/> - </AuxValues> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="1" gridY="1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Container class="javax.swing.JPanel" name="jPanel1"> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/> - </Constraint> - </Constraints> - - <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> - </Container> - </SubComponents> -</Form> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java deleted file mode 100644 index bf10d713e4c7..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import org.openide.util.NbBundle; - -/** A single panel for a wizard - the GUI portion. - */ -public class ParcelPropertiesVisualPanel extends javax.swing.JPanel { - - /** The wizard panel descriptor associated with this GUI panel. - * If you need to fire state changes or something similar, you can - * use this handle to do so. - */ - private final ParcelPropertiesPanel panel; - - /** Create the wizard panel and set up some basic properties. */ - public ParcelPropertiesVisualPanel(ParcelPropertiesPanel panel) { - this.panel = panel; - initComponents(); - - languagesComboBox.addItem("Java"); - languagesComboBox.addItem("BeanShell"); - - // Provide a name in the title bar. - setName(NbBundle.getMessage(ParcelPropertiesVisualPanel.class, - "TITLE_ParcelPropertiesVisualPanel")); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - java.awt.GridBagConstraints gridBagConstraints; - - jLabel1 = new javax.swing.JLabel(); - recipeName = new javax.swing.JTextField(); - jLabel2 = new javax.swing.JLabel(); - languagesComboBox = new javax.swing.JComboBox(); - jPanel1 = new javax.swing.JPanel(); - - setLayout(new java.awt.GridBagLayout()); - - setPreferredSize(new java.awt.Dimension(500, 300)); - jLabel1.setText("Parcel Recipe Name"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 0; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 2); - add(jLabel1, gridBagConstraints); - - recipeName.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - recipeNameActionPerformed(evt); - } - }); - - recipeName.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - recipeNameFocusGained(evt); - } - public void focusLost(java.awt.event.FocusEvent evt) { - recipeNameFocusLost(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 0; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.insets = new java.awt.Insets(12, 0, 11, 11); - add(recipeName, gridBagConstraints); - - jLabel2.setText("Initial Script Language"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 1; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(0, 12, 11, 12); - add(jLabel2, gridBagConstraints); - - languagesComboBox.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - languagesComboBoxActionPerformed(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 1; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 11); - add(languagesComboBox, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; - gridBagConstraints.weighty = 1.0; - add(jPanel1, gridBagConstraints); - - }//GEN-END:initComponents - - private void recipeNameFocusGained(java.awt.event.FocusEvent - evt) {//GEN-FIRST:event_recipeNameFocusGained - recipeName.selectAll(); - }//GEN-LAST:event_recipeNameFocusGained - - private void recipeNameFocusLost(java.awt.event.FocusEvent - evt) {//GEN-FIRST:event_recipeNameFocusLost - changeName(); - }//GEN-LAST:event_recipeNameFocusLost - - private void languagesComboBoxActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_languagesComboBoxActionPerformed - String language = (String)languagesComboBox.getSelectedItem(); - panel.setLanguage(language); - }//GEN-LAST:event_languagesComboBoxActionPerformed - - private void recipeNameActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_recipeNameActionPerformed - changeName(); - }//GEN-LAST:event_recipeNameActionPerformed - - private void changeName() { - String name = recipeName.getText().trim(); - - if (name.length() == 0) - name = null; - - panel.setName(name); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JTextField recipeName; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel1; - private javax.swing.JPanel jPanel1; - private javax.swing.JComboBox languagesComboBox; - // End of variables declaration//GEN-END:variables - -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java deleted file mode 100644 index dfa434d75a35..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.awt.Component; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import org.openide.WizardDescriptor; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; - -import org.openoffice.netbeans.modules.office.options.OfficeSettings; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.idesupport.SVersionRCFile; - -/** A single panel descriptor for a wizard. - * You probably want to make a wizard iterator to hold it. - */ -public class SelectPathPanel implements - WizardDescriptor.Panel { /* .FinishPanel */ - - /** The visual component that displays this panel. - * If you need to access the component from this class, - * just use getComponent(). - */ - private SelectPathVisualPanel component; - private OfficeInstallation office; - - /** Create the wizard panel descriptor. */ - public SelectPathPanel() { - office = OfficeSettings.getDefault().getOfficeDirectory(); - - if (office == null) { - try { - office = SVersionRCFile.createInstance().getDefaultVersion(); - } catch (java.io.IOException ioe) {} - } - } - - // Get the visual component for the panel. In this template, the component - // is kept separate. This can be more efficient: if the wizard is created - // but never displayed, or not all panels are displayed, it is better to - // create only those which really need to be visible. - public Component getComponent() { - if (component == null) { - component = new SelectPathVisualPanel(this); - } - - return component; - } - - public HelpCtx getHelp() { - // Show no Help button for this panel: - return HelpCtx.DEFAULT_HELP; - // If you have context help: - // return new HelpCtx(SelectPathPanel.class); - } - - public boolean isValid() { - // If it is always OK to press Next or Finish, then: - return true; - // If it depends on some condition (form filled out...), then: - // return someCondition(); - // and when this condition changes (last form field filled in...) then: - // fireChangeEvent(); - // and uncomment the complicated stuff below. - } - - private final Set listeners = new HashSet(1); // Set<ChangeListener> - public final void addChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.add(l); - } - } - public final void removeChangeListener(ChangeListener l) { - synchronized (listeners) { - listeners.remove(l); - } - } - protected final void fireChangeEvent() { - Iterator it; - - synchronized (listeners) { - it = new HashSet(listeners).iterator(); - } - - ChangeEvent ev = new ChangeEvent(this); - - while (it.hasNext()) { - ((ChangeListener)it.next()).stateChanged(ev); - } - } - - public void setSelectedPath(OfficeInstallation oi) { - this.office = oi; - fireChangeEvent(); - } - - public OfficeInstallation getSelectedPath() { - return office; - } - - // You can use a settings object to keep track of state. - // Normally the settings object will be the WizardDescriptor, - // so you can use WizardDescriptor.getProperty & putProperty - // to store information entered by the user. - public void readSettings(Object settings) { - } - - public void storeSettings(Object settings) { - WizardDescriptor wiz = (WizardDescriptor)settings; - wiz.putProperty(InstallationPathDescriptor.PROP_INSTALLPATH, office); - } -} diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form deleted file mode 100644 index eb742089ed19..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.form +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . ---> -<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> - <Properties> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[600, 300]"/> - </Property> - </Properties> - <AuxValues> - <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,27,0,0,2,1"/> - </AuxValues> - - <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> - <SubComponents> - <Component class="javax.swing.JLabel" name="jLabel1"> - <Properties> - <Property name="text" type="java.lang.String" value="Installations Detected"/> - </Properties> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="11" insetsRight="2" anchor="17" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JTextField" name="installPath"> - <Properties> - <Property name="editable" type="boolean" value="false"/> - </Properties> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="10" weightX="1.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JLabel" name="jLabel2"> - <Properties> - <Property name="text" type="java.lang.String" value="Installation Directory"/> - </Properties> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="11" insetsRight="12" anchor="10" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Component class="javax.swing.JComboBox" name="installationsComboBox"> - <AuxValues> - <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CreateCodePre" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value=""/> - <AuxValue name="JavaCodeGenerator_CodeGeneration" type="java.lang.Integer" value="0"/> - </AuxValues> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - <Container class="javax.swing.JPanel" name="jPanel1"> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="-1" gridY="2" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/> - </Constraint> - </Constraints> - - <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> - </Container> - <Component class="javax.swing.JButton" name="browseButton"> - <Properties> - <Property name="text" type="java.lang.String" value="Browse..."/> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/> - </Events> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="2" gridY="1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> - </Constraint> - </Constraints> - </Component> - </SubComponents> -</Form> diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java deleted file mode 100644 index ca26a25bc150..000000000000 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathVisualPanel.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -package org.openoffice.netbeans.modules.office.wizard; - -import java.util.Hashtable; -import java.util.Enumeration; -import java.io.File; -import java.io.IOException; -import javax.swing.JFileChooser; - -import org.openide.util.NbBundle; -import org.openoffice.idesupport.SVersionRCFile; -import org.openoffice.idesupport.OfficeInstallation; -import org.openoffice.netbeans.modules.office.options.OfficeSettings; - -/** A single panel for a wizard - the GUI portion. - */ -public class SelectPathVisualPanel extends javax.swing.JPanel { - - /** The wizard panel descriptor associated with this GUI panel. - * If you need to fire state changes or something similar, you can - * use this handle to do so. - */ - private final SelectPathPanel panel; - - /** Create the wizard panel and set up some basic properties. */ - public SelectPathVisualPanel(SelectPathPanel panel) { - this.panel = panel; - initComponents(); - OfficeInstallation orig = panel.getSelectedPath(); - - try { - Enumeration enumer = SVersionRCFile.createInstance().getVersions(); - - while (enumer.hasMoreElements()) { - OfficeInstallation oi = (OfficeInstallation)enumer.nextElement(); - installationsComboBox.addItem(oi); - } - } catch (IOException ioe) { - installationsComboBox.addItem("<empty>"); - } - - if (orig != null) { - installationsComboBox.setSelectedItem(orig); - installPath.setText(orig.getPath()); - } - - installationsComboBox.addActionListener( - new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - installationsComboBoxActionPerformed(evt); - } - } - ); - - // Provide a name in the title bar. - setName(NbBundle.getMessage(SelectPathVisualPanel.class, - "TITLE_SelectPathVisualPanel")); - } - - private void installationsComboBoxActionPerformed( - java.awt.event.ActionEvent evt) { - - OfficeInstallation oi = - (OfficeInstallation)installationsComboBox.getSelectedItem(); - - installPath.setText(oi.getPath()); - panel.setSelectedPath(oi); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - private void initComponents() {//GEN-BEGIN:initComponents - java.awt.GridBagConstraints gridBagConstraints; - - jLabel1 = new javax.swing.JLabel(); - installPath = new javax.swing.JTextField(); - jLabel2 = new javax.swing.JLabel(); - installationsComboBox = new javax.swing.JComboBox(); - jPanel1 = new javax.swing.JPanel(); - browseButton = new javax.swing.JButton(); - - setLayout(new java.awt.GridBagLayout()); - - setPreferredSize(new java.awt.Dimension(600, 300)); - jLabel1.setText("Installations Detected"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 0; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 2); - add(jLabel1, gridBagConstraints); - - installPath.setEditable(false); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 1; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.insets = new java.awt.Insets(12, 0, 11, 11); - add(installPath, gridBagConstraints); - - jLabel2.setText("Installation Directory"); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 1; - gridBagConstraints.insets = new java.awt.Insets(12, 12, 11, 12); - add(jLabel2, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 0; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.insets = new java.awt.Insets(11, 0, 11, 11); - add(installationsComboBox, gridBagConstraints); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridy = 2; - gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; - gridBagConstraints.weighty = 1.0; - add(jPanel1, gridBagConstraints); - - browseButton.setText("Browse..."); - browseButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - browseButtonActionPerformed(evt); - } - }); - - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 2; - gridBagConstraints.gridy = 1; - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; - add(browseButton, gridBagConstraints); - - }//GEN-END:initComponents - - private void browseButtonActionPerformed(java.awt.event.ActionEvent - evt) {//GEN-FIRST:event_browseButtonActionPerformed - // Add your handling code here: - File target = null; - - JFileChooser chooser = new JFileChooser(); - chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - int result = chooser.showDialog(null, null); - - if (result == JFileChooser.APPROVE_OPTION) { - target = chooser.getSelectedFile(); - - String path; - - try { - path = target.getCanonicalPath(); - } catch (IOException ioe) { - path = target.getAbsolutePath(); - } - - OfficeInstallation oi = new OfficeInstallation(path, path); - - if (oi.supportsFramework()) { - installPath.setText(path); - panel.setSelectedPath(oi); - } - } - - }//GEN-LAST:event_browseButtonActionPerformed - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JTextField installPath; - private javax.swing.JButton browseButton; - private javax.swing.JComboBox installationsComboBox; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel1; - private javax.swing.JPanel jPanel1; - // End of variables declaration//GEN-END:variables -} |