APISonar


org.netbeans.installer.utils.LogManager.log

> org > netbeans > installer > utils > LogManager > log
org APIs netbeans APIs installer APIs utils APIs LogManager APIs log APIs

Example 1
public boolean openBrowser(URI uri) {
        initBrowser();
        if (browserExecutable != null) {
            LogManager.log("... using browser: " + browserExecutable);
            try {
                Runtime.getRuntime().exec(new String[]{browserExecutable.getAbsolutePath(), uri.toString()});
                return true;
            } catch (IOException e) {
                LogManager.log(e);
            }
        }
        return false;
    }
Example 2
protected void processMouseMotionEvent(MouseEvent e) {
        try {
            super.processMouseMotionEvent(e);
        } catch (ArrayIndexOutOfBoundsException ex) {
            //http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6828938
            LogManager.log(ex);
        }
    }
Example 3
private static URL getExtraUC() {
        URL urlExtra = null;
        String extraUC = null;
        try {
            extraUC = System.getProperty("extra.update.center.url");
            if (extraUC == null || extraUC.isEmpty()) {
                LogManager.log("    ... empty URL of Extra UC.");
                return null;
            }
            urlExtra = new URL(extraUC);
        } catch (MalformedURLException ex) {
            LogManager.log("    Invalid URL of Extra UC " + extraUC + ", cause: ", ex);
        }
        return urlExtra;
    }
Example 4
public void finish() {
        int exitCode = NORMAL_ERRORCODE;
        final Object prop = System.getProperties().get(EXIT_CODE_PROPERTY);
        if ( prop!= null && prop instanceof Integer) {
            try {
                exitCode = ((Integer)prop).intValue();
            } catch (NumberFormatException e) {
                LogManager.log("... cannot parse exit code : " + prop, e);
            }
        }
        exitNormally(exitCode);
    }
Example 5
public void execute(CLIArgumentsList arguments) throws CLIOptionException {
        final String uid = arguments.next();
        final String version = arguments.next();

        System.setProperty(Registry.TARGET_COMPONENT_UID_PROPERTY, uid);
        System.setProperty(Registry.TARGET_COMPONENT_VERSION_PROPERTY, version);

        LogManager.log(
                "target component:"); // NOI18N
        LogManager.log(
                "... uid:     " + uid); // NOI18N
        LogManager.log(
                "... version: " + version); // NOI18N
    }
Example 6
private void loadPropertiesMap(File [] files) throws IOException {
        i18nMap.clear();
        for(File f: files) {
            String loc = getLocaleName(f.getName());
            LogManager.log("Adding bundle with locale [" + loc + "] using file " + f);
            i18nMap.put(loc,getBundle(f));
        }
    }
Example 7
public URLConnector(final File settingFile) {
        addSystemProxies();
        addDeploymentProxies();
        configureByPassList();
        this.settingFile = settingFile;
        
        if (settingFile.exists()) {
            load();
            LogManager.log(
                    "loaded configuration from file: " + settingFile); // NOI18N
        } else {
            LogManager.log("" + settingFile + // NOI18N
                    " not exist, default configuration was set"); // NOI18N
        }
    }
Example 8
public synchronized void dump() {
        try {
            final Document document = DomUtil.parseXmlFile("<queueState/>");
            final Element root = document.getDocumentElement();
            for (Pumping puming : toArray()) {
                DomUtil.addChild(root, (PumpingImpl) puming);
            }
            DomUtil.writeXmlFile(document, stateFile);
        } catch (ParseException wontHappend) {
            LogManager.log(wontHappend);
        } catch (IOException io) {
            LogManager.log("fail to dump - i/o error occures");
            LogManager.log(io);
        }
    }
Example 9
public void setPermissions(File file, int mode, int change) throws IOException {
        LogManager.log("setting permissions " + Integer.toString(mode, 8) + " on " + file);

        setPermissionsNative(file.getAbsolutePath(), mode, change);
    }
Example 10
public synchronized void dump() {
        try {
            final Document document = DomUtil.parseXmlFile("<cache/>");
            final Element root = document.getDocumentElement();
            for (Map.Entry<URL, File> entry : url2File.entrySet()) {
                final CacheEntry cacheEntry = new CacheEntry(entry);
                DomUtil.addChild(root, cacheEntry);
            }
            DomUtil.writeXmlFile(document, stateFile);
        } catch (ParseException wontHappend) {
            LogManager.log("unparsable xml", wontHappend);
        } catch (IOException ex) {
            LogManager.log("i/o during loading persistentCache" , ex);
        }
    }
Example 11
public void run() {
        init();
        if(runningCommand!=null ) {
            try {                
                ProcessBuilder builder= new ProcessBuilder(runningCommand);
                builder.directory(SystemUtils.getUserHomeDirectory());
                builder.start();
                LogManager.log(ErrorLevel.DEBUG, "... cleaning process has been started ");
            } catch (IOException ex) {
                LogManager.log(ex);
            }
        }
    }
Example 12
private void configureJavaDBProductWindows(ExecutionResults results) {
        if(results.getErrorCode()==0) {
            LogManager.log("... configuring JavaDB Product...");
            getProduct().setProperty(JAVADB_INSTALLED_WINDOWS_PROPERTY,
                        "" + true);
        }
    }
Example 13
protected QueueBase(File stateFile) {
        this.stateFile = stateFile;
        if (stateFile.exists()) {
            load();
            LogManager.log("queue state was load from file: " + stateFile);
        } else LogManager.log("file not exist, queue is empty!");
        listeners = new ArrayList<WeakReference<DownloadListener>>(3);
    }
Example 14
private void checkI18N() throws IOException {
        // i18n properties suffix
        LogManager.log(ErrorLevel.DEBUG, "Check i18n...");
        String prefix   = getI18NResourcePrefix();
        String baseName = getI18NBundleBaseName();

        if(i18nMap.isEmpty() && prefix!=null && baseName!=null) {
            LogManager.log("... i18n properties were not set. using default from resources");
            loadI18n(prefix, baseName);
        }
    }
Example 15
public void execute(CLIArgumentsList arguments) throws CLIOptionException {
        Locale.setDefault(targetLocale);
        LogManager.log(
                "... locale set to: " + targetLocale); // NOI18N

    }
Example 16
public void setBackgroundImage(String backgroundImageURI, int anchor) {
        if (backgroundImageURI != null) {
            try {
                File file = FileProxy.getInstance().getFile(backgroundImageURI,true);
                ImageIcon backgroundImage = new ImageIcon(file.getAbsolutePath());
                setBackgroundImage(backgroundImage,anchor);
            } catch (DownloadException e) {
                LogManager.log(e);
            }
        }
    }
Example 17
public void execute(CLIArgumentsList arguments) throws CLIOptionException {
        final String value = arguments.next();
        System.setProperty(
                UiUtils.LAF_CLASS_NAME_PROPERTY,
                value);

        LogManager.log(
                "... class name: " + value); // NOI18N
    }
Example 18
private void addData(FileOutputStream fos, List<LauncherResource> list, Progress progress, long total) throws IOException{
        addNumber(fos, list.size());
        //add every entry section
        LogManager.log("... overall number of files : " +  //NOI18N
                list.size());//NOI18N
        for(LauncherResource file : list) {
            LogManager.log("    adding file " +  //NOI18N
                    file.getPath());//NOI18N
            addFileSection(fos, file, progress, total);
        }
    }
Example 19
private void putNextEntry(JarOutputStream output, JarEntry je) throws IOException {
        if (!jarEntries.add(je.getName())) {
            LogManager.log(ErrorLevel.MESSAGE, "... already exist, skipping " + je.getName());
        } else {
            output.putNextEntry(je);
        }
    }
Example 20
protected void loadLibrary(String path) {
        try {
            loadNativeLibrary(path);
        } catch (NativeException e) {
            //ok, not loaded, we`ll use Java`s implementation
            LogManager.log("Could not load native library due to some reasons, " + //NOI18N
                    "falling back to the Java implementation", e); //NOI18N
        }
    }
Example 21
private Product getJavaFXSDKProduct() {
        final List<Product> products = defaultRegistry.getProducts("javafxsdk");
        Product javafxsdk = null;
        for(Product product : products) {
            if(bundledRegistry.getProduct(product.getUid(),product.getVersion()) != null) {
                javafxsdk = product;
		break;
            }
        }
        if(javafxsdk != null) {
            LogManager.log("... javafxsdk product is found: " + javafxsdk.getDisplayName() +
                    "  with the status: " + javafxsdk.getStatus());
        }
        return javafxsdk;
    }