Package org.eclipse.ui

Examples of org.eclipse.ui.IMarkerResolution


    public List<IMarkerResolution> getResolutions(IMarker marker) {
        List<IMarkerResolution> result = new LinkedList<IMarkerResolution>();

        final String suggestedVersion = marker.getAttribute(PROP_SUGGESTED_VERSION, null);
        if (suggestedVersion != null) {
            result.add(new IMarkerResolution() {
                @Override
                public void run(IMarker marker) {
                    final IFile file = (IFile) marker.getResource();
                    final IWorkspace workspace = file.getWorkspace();
                    try {
View Full Code Here


    public List<IMarkerResolution> getResolutions(IMarker marker) {
        List<IMarkerResolution> result = new LinkedList<IMarkerResolution>();

        final String suggestedVersion = marker.getAttribute(PROP_SUGGESTED_VERSION, null);
        if (suggestedVersion != null) {
            result.add(new IMarkerResolution() {
                public void run(IMarker marker) {
                    final IFile file = (IFile) marker.getResource();
                    final IWorkspace workspace = file.getWorkspace();
                    try {
                        workspace.run(new IWorkspaceRunnable() {
View Full Code Here

            Map<String, String> attributes = parseAttributes((Element) resolutionNodes.item(i));
            if (attributes.isEmpty()) {
                resolutionClasses.add(resolutionClass);
            } else {
                IMarkerResolution resolution = instantiateBugResolution(resolutionClass, attributes);
                if (resolution != null) {
                    resolutions.add(resolution);
                }
            }
        }
View Full Code Here

    @CheckForNull
    private IMarkerResolution instantiateBugResolution(Class<? extends IMarkerResolution> resolutionClass,
            Map<String, String> attributes) {
        try {
            IMarkerResolution resolution = resolutionClass.newInstance();
            loadAttributes(resolution, attributes);
            return resolution;
        } catch (InstantiationException e) {
            FindbugsPlugin.getDefault().logException(e,
                    "Failed to instaniate BugResolution '" + resolutionClass.getSimpleName() + "'.");
View Full Code Here

  public MarkerResolutionGenerator() {
    super();
  }

  public IMarkerResolution[] getResolutions(IMarker marker) {
    IMarkerResolution markerResolution = new IMarkerResolution() {

      public String getLabel() {
        return "Set dependencies";
      }
View Full Code Here

    private Set<IMarkerResolution> instantiateBugResolutions(Set<Class<? extends IMarkerResolution>> classes) {
        assert classes != null;
        Set<IMarkerResolution> fixes = new HashSet<IMarkerResolution>();
        for (Class<? extends IMarkerResolution> resolutionClass : classes) {
            IMarkerResolution fixer = instantiateBugResolution(resolutionClass);
            if (fixer != null) {
                fixes.add(fixer);
            }
        }
        return fixes;
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IMarkerResolution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.