APISonar


org.xmind.ui.util.Logger.log

> org > xmind > ui > util > Logger > log
org APIs xmind APIs ui APIs util APIs Logger APIs log APIs

Example 1
private String getTrimmedContent(int textLength) {
        String content;
        try {
            content = document.get(offset, textLength);
        } catch (BadLocationException e) {
            Logger.log(e, "Failed to obtain text contet"); //$NON-NLS-1$
            return null;
        }
        return trimContent(content);
    }
Example 2
protected void handleExportException(Throwable e) {
        Logger.log(e, NLS.bind(WizardMessages.Import_FailedWhenImport,
                getApplicationId()));
    }
Example 3
public void configurePage(IGraphicalEditorPage page) {
        ensureLoaded();
        for (IMindMapEditorConfigurer configurer : configurers.values()) {
            try {
                configurer.configureEditorPage(page);
            } catch (Throwable e) {
                Logger.log(e);
            }
        }
    }
Example 4
public void configureEditor(MindMapEditor editor) {
        ensureLoaded();
        for (IMindMapEditorConfigurer configurer : configurers.values()) {
            try {
                configurer.configureEditor(editor);
            } catch (Throwable e) {
                Logger.log(e);
            }
        }
    }
Example 5
private InputStream getStream() {
        IFileEntry entry = workbook.getManifest().getFileEntry(path);
        if (entry == null) {
            Logger.log("Failed to get file entry by entry path: " + path); //$NON-NLS-1$
            return null;
        }
        try {
            return new BufferedInputStream(entry.openInputStream());
        } catch (IOException e) {
            Logger.log("Failed to get input stream from workbook entry: " //$NON-NLS-1$
                    + path);
            return null;
        }
    }
Example 6
private static PrintStream createPrintStream(OutputStream out) {
        try {
            return new UnicodePrintStream(out);
        } catch (UnsupportedEncodingException e) {
            Logger.log(e, "Unable to export text with utf-8 encoding."); //$NON-NLS-1$
        }
        return new PrintStream(out);
    }
Example 7
protected void handleExportException(Throwable e) {
        Logger.log(e, NLS.bind(WizardMessages.Export_FailedWhenExport,
                getFormatName()));
        e.printStackTrace();

        if (e instanceof FileNotFoundException) {
            MessageDialog.openInformation(getShell(),
                    WizardMessages.ExportPage_FindFileFail_title,
                    WizardMessages.ExportPage_FindFileFail_message);
        }
    }
Example 8
protected IPart createSpecificPart(IPart parent,
            Class<? extends IPart> partType, Object model) {
        try {
            IPart part = (IPart) partType.newInstance();
            part.setModel(model);
            return part;
        } catch (Exception e1) {
            Logger
                    .log(
                            e1,
                            "Unknown part type when creating part for: " + model); //$NON-NLS-1$
        }
        return null;
    }
Example 9
private void handleExportException(Throwable e) {
        Logger.log(e,
                NLS.bind("Error occurred when generating {0} file.", "SVG")); //$NON-NLS-1$//$NON-NLS-2$
    }
Example 10
public void readHyperlinkPageDescriptor(IConfigurationElement element) {
        try {
            registerHyperlinkPageDescriptor(new HyperlinkPageDescriptor(element));
        } catch (CoreException e) {
            Logger.log(e);
        }
    }
Example 11
private void readConfigurer(IConfigurationElement element) {
        String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
        if (id == null) {
            return;
        }
        try {
            addConfigurer(id, createConfigurer(element));
        } catch (CoreException e) {
            Logger.log(e);
        }
    }
Example 12
private IHyperlinkPage createPage(HyperlinkPageDescriptor desc) {
        try {
            return desc.createPage();
        } catch (CoreException e) {
            Logger.log(e);
        }
        return new NullHyperlinkPage();
    }
Example 13
private void readChooser(IConfigurationElement element) {
        try {
            IActionBuilder actionBuilder = new ActionBuilder(element);
            register(actionBuilder);
        } catch (CoreException e) {
            Logger.log(e);
        }
    }
Example 14
private IProtocol createProtocol(ProtocolDescriptor p) {
        try {
            return p.createProtocol();
        } catch (CoreException e) {
            Logger.log(e, "Failed to create protocol: " + p.getId()); //$NON-NLS-1$
        }
        return getDefaultProtocol();
    }
Example 15
private IStyleSheet createSystemStyleSheet() {
        URL url = find(PATH_STYLES, STYLES, EXT_XML);
        if (url != null) {
            try {
                IStyleSheet sheet = Core.getStyleSheetBuilder()
                        .loadFromUrl(url);
                loadPropertiesFor(sheet, PATH_STYLES, STYLES);
                return sheet;
            } catch (Exception e) {
                Logger.log(e, "Falied to load saved styles: " + url); //$NON-NLS-1$
            }
        }
        return Core.getStyleSheetBuilder().createStyleSheet();
    }
Example 16
private IMarkerSheet createSystemMarkerShet() {
        URL url = find(PATH_MARKERS, MARKER_SHEET_XML);
        if (url != null) {
            try {
                IMarkerSheet sheet = Core.getMarkerSheetBuilder()
                        .loadFromURL(url, new SystemMarkerResourceProvider());
                loadPropertiesFor(sheet, PATH_MARKERS, MARKER_SHEET);
                return sheet;
            } catch (Exception e) {
                Logger.log(e, "Failed to load system marker from: " + url); //$NON-NLS-1$
            }
        }
        return Core.getMarkerSheetBuilder()
                .createMarkerSheet(new SystemMarkerResourceProvider());
    }
Example 17
private void readShareOption(IConfigurationElement element) {
        ShareOption descriptor;
        try {
            descriptor = new ShareOption(element);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load share item: " + element); //$NON-NLS-1$
            return;
        }
        if (options == null) {
            options = new ArrayList<ShareOption>();
        }
        options.add(descriptor);
    }
Example 18
private void initializeEnablement() {
        IConfigurationElement[] enablements = element
                .getChildren(TAG_ENABLEMENT);
        if (enablements.length == 0)
            return;

        try {
            condition = ExpressionConverter.getDefault()
                    .perform(enablements[0]);
        } catch (CoreException e) {
            Logger.log(e, "Failed to convert expression: " + enablements[0]); //$NON-NLS-1$
        }
    }
Example 19
private void loadUnmodifiableProperty(IConfigurationElement element) {
        try {
            UnmodifiableProperty unmodifiableProperty = new UnmodifiableProperty(
                    element);
            registerUnmodifiableProperty(unmodifiableProperty);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load unmodifiable property: " //$NON-NLS-1$ 
                    + element);
        }
    }
Example 20
private void readBranchPolicyCategory(IConfigurationElement element) {
        try {
            BranchPolicyCategoryDescriptor descriptor = new BranchPolicyCategoryDescriptor(
                    element);
            registerBranchPolicyCategory(descriptor);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load branch policy category: " //$NON-NLS-1$
                    + element.toString());
        }
    }
Example 21
private void initializeEnablement() {
        IConfigurationElement[] children = element.getChildren(TAG_ENABLEMENT);
        if (children.length == 0)
            return;

        try {
            condition = ExpressionConverter.getDefault().perform(children[0]);
        } catch (CoreException e) {
            Logger.log(e, "Failed to convert expression: " + children[0]); //$NON-NLS-1$
        }
    }
Example 22
private void readStyleValueProvider(IConfigurationElement element) {
        try {
            ContributedStyleValueProvider valueProvider = new ContributedStyleValueProvider(
                    element);
            registerValueProvider(valueProvider);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load style value provider: " //$NON-NLS-1$
                    + element.toString());
        }
    }
Example 23
private void readAdditionalStructure(IConfigurationElement element) {
        try {
            AdditionalStructure additionalStructure = new AdditionalStructure(
                    manager, element);
            registerAdditionStructure(additionalStructure);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load additional structure: " //$NON-NLS-1$
                    + element);
        }
    }
Example 24
private void readIconTip(IConfigurationElement element) {
        IIconTipContributor contributor;
        try {
            contributor = new IconTipContributorProxy(element);
        } catch (CoreException e) {
            Logger.log(e, "Failed to load icon tip: " + element); //$NON-NLS-1$
            return;
        }
        if (contributors == null)
            contributors = new ArrayList<IIconTipContributor>();
        contributors.add(contributor);
    }
Example 25
private void initializeEnablement() {
        IConfigurationElement[] elements = element
                .getChildren(IWorkbenchRegistryConstants.TAG_ENABLEMENT);
        if (elements.length == 0)
            return;

        try {
            condition = ExpressionConverter.getDefault().perform(elements[0]);
        } catch (CoreException e) {
            Logger.log(e, "Failed to convert expression: " //$NON-NLS-1$
                    + elements[0].getNamespaceIdentifier());
        }
    }