Search Results

Search found 2 results on 1 pages for 'daro'.

Page 1/1 | 1 

  • QuickFix Component in Eclipse

    - by Daro Royoss
    My aim is to extend the eclipse QuickFix component and automate the process of solving syntax errors. Basically, the QuickFix component provides a list of solutions and my task is to select the best possible fix and apply it to the buggy code. But, for now I've been requested to print the resolutions for a marker in the console. I've tried to work out a tutorial and I'm kind of stuck right now. The tutorial I've tried to workout is: http://www.informit.com/articles/article.aspx?p=370625&seqNum=21 I've first added the extension in my plugin.xml file <extension point="org.eclipse.ui.ide.markerResolution"> <markerResolutionGenerator markerType="org.eclipse.core.resources.problemmarker" class="org.eclipse.escript.quickfix.QuickFixer"/> </extension> Then i have created the two classes QuickFixer and QuickFix. package quickfixer; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.ui.IMarkerResolution; import org.eclipse.ui.IMarkerResolutionGenerator; class QuickFixer implements IMarkerResolutionGenerator { public IMarkerResolution[] getResolutions(IMarker arg0) { try { Object problem = arg0.getAttribute("Whatsup"); return new IMarkerResolution[] { new QuickFix("Fix #1 for "+problem), new QuickFix("Fix #2 for "+problem), }; } catch(CoreException e) { return new IMarkerResolution[0]; } } } then the class QuickFix: package quickfixer; import org.eclipse.core.resources.IMarker; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.ui.IMarkerResolution; public class QuickFix implements IMarkerResolution { String label; QuickFix(String label) { this.label = label; } public String getLabel() { return label; } public void run(IMarker arg0) { MessageDialog.openInformation(null, "QuickFix Demo", "This quick-fix is not yet implemented"); System.out.println("Label: " + label); } } I've managed to correct all the errors i encountered and then i have run the plugin. I have not been able to get the label printed out in the console.Any suggestions???...

    Read the article

  • OnShutdown() not working on XP

    - by Daro
    I have a service registered for shutdown events (.Net 3.5): public ServiceName() { InitializeComponent(); base.CanHandleSessionChangeEvent = true; base.CanHandlePowerEvent = true; base.CanShutdown = true; } protected override void OnShutdown() { try { if (Program.Debug2Eventlog == true) { WriteEventEntry( "Computer is shutting down.", EventLogEntryType.Information, 0, 3); } } catch {} base.OnShutdown(); } Windows 7 logs the event just fine, but XP doesn't. Am I missing something?

    Read the article

1