org.eclipse.mylyn.wikitext.ui_1.6.1.v20120425-0100

ng/Object;)Ljava/lang/String;
    //   408: invokespecial 222	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   411: aload 8
    //   413: invokevirtual 225	java/lang/Throwable:getMessage	()Ljava/lang/String;
    //   416: invokevirtual 223	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   419: invokevirtual 221	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   422: invokevirtual 213	java/io/PrintWriter:println	(Ljava/lang/String;)V
    //   425: aload 10
    //   427: getstatic 206	org/eclipse/mylyn/wikitext/ui/commands/Messages:ConvertMarkupToEclipseHelp_detailsFollow	Ljava/lang/String;
    //   430: invokevirtual 213	java/io/PrintWriter:println	(Ljava/lang/String;)V
    //   433: aload 8
    //   435: aload 10
    //   437: invokevirtual 224	java/lang/Throwable:printStackTrace	(Ljava/io/PrintWriter;)V
    //   440: aload 10
    //   442: invokevirtual 211	java/io/PrintWriter:close	()V
    //   445: invokestatic 239	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   448: invokeinterface 250 1 0
    //   453: invokeinterface 252 1 0
    //   458: getstatic 204	org/eclipse/mylyn/wikitext/ui/commands/Messages:ConvertMarkupToEclipseHelp_cannotCompleteOperation	Ljava/lang/String;
    //   461: aload 9
    //   463: invokevirtual 218	java/io/StringWriter:toString	()Ljava/lang/String;
    //   466: invokestatic 228	org/eclipse/jface/dialogs/MessageDialog:openError	(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;)V
    //   469: return
    // Line number table:
    //   Java source line #39	-> byte code offset #0
    //   Java source line #40	-> byte code offset #6
    //   Java source line #41	-> byte code offset #44
    //   Java source line #43	-> byte code offset #53
    //   Java source line #44	-> byte code offset #66
    //   Java source line #45	-> byte code offset #69
    //   Java source line #46	-> byte code offset #72
    //   Java source line #45	-> byte code offset #85
    //   Java source line #42	-> byte code offset #88
    //   Java source line #47	-> byte code offset #94
    //   Java source line #51	-> byte code offset #95
    //   Java source line #52	-> byte code offset #108
    //   Java source line #54	-> byte code offset #118
    //   Java source line #55	-> byte code offset #127
    //   Java source line #56	-> byte code offset #136
    //   Java source line #58	-> byte code offset #142
    //   Java source line #59	-> byte code offset #163
    //   Java source line #60	-> byte code offset #173
    //   Java source line #61	-> byte code offset #182
    //   Java source line #62	-> byte code offset #192
    //   Java source line #64	-> byte code offset #214
    //   Java source line #66	-> byte code offset #236
    //   Java source line #69	-> byte code offset #243
    //   Java source line #70	-> byte code offset #252
    //   Java source line #73	-> byte code offset #280
    //   Java source line #74	-> byte code offset #283
    //   Java source line #73	-> byte code offset #291
    //   Java source line #76	-> byte code offset #306
    //   Java source line #77	-> byte code offset #308
    //   Java source line #78	-> byte code offset #313
    //   Java source line #77	-> byte code offset #316
    //   Java source line #80	-> byte code offset #321
    //   Java source line #82	-> byte code offset #333
    //   Java source line #98	-> byte code offset #346
    //   Java source line #99	-> byte code offset #364
    //   Java source line #100	-> byte code offset #365
    //   Java source line #101	-> byte code offset #366
    //   Java source line #102	-> byte code offset #368
    //   Java source line #104	-> byte code offset #374
    //   Java source line #105	-> byte code offset #376
    //   Java source line #106	-> byte code offset #385
    //   Java source line #107	-> byte code offset #396
    //   Java source line #108	-> byte code offset #425
    //   Java source line #109	-> byte code offset #433
    //   Java source line #110	-> byte code offset #440
    //   Java source line #112	-> byte code offset #445
    //   Java source line #113	-> byte code offset #458
    //   Java source line #112	-> byte code offset #466
    //   Java source line #115	-> byte code offset #469
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	470	0	this	ConvertMarkupToEclipseHelp
    //   0	470	1	file	IFile
    //   0	470	2	name	String
    //   43	296	3	newFile	IFile
    //   106	3	4	parentFullPath	org.eclipse.core.runtime.IPath
    //   116	58	5	pluginPathToHelp	org.eclipse.core.runtime.IPath
    //   125	197	6	markupToEclipseToc	org.eclipse.mylyn.wikitext.core.parser.util.MarkupToEclipseToc
    //   161	78	7	htmlFilePath	String
    //   180	39	8	pathPart	String
    //   250	74	8	w	java.io.StringWriter
    //   374	60	8	e	Throwable
    //   278	39	9	r	java.io.Reader
    //   383	79	9	message	java.io.StringWriter
    //   283	3	10	i	int
    //   297	3	10	i	int
    //   331	9	10	tocXml	String
    //   394	47	10	out	java.io.PrintWriter
    //   306	8	11	localObject1	Object
    //   344	11	11	runnable	Object
    //   366	3	12	e	InvocationTargetException
    //   364	1	20	localInterruptedException	InterruptedException
    // Exception table:
    //   from	to	target	type
    //   280	306	306	finally
    //   346	361	364	java/lang/InterruptedException
    //   346	361	366	java/lang/reflect/InvocationTargetException
    //   243	365	374	java/lang/Throwable
    //   366	374	374	java/lang/Throwable
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.commands.ConvertMarkupToEclipseHelp
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.commands;

import org.eclipse.osgi.util.NLS;

class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.mylyn.wikitext.ui.commands.messages";
  public static String AbstractMarkupResourceHandler_markupLanguageMappingFailed;
  public static String AbstractMarkupResourceHandler_unexpectedError;
  public static String ConvertMarkupToDocbook_cannotCompleteOperation;
  public static String ConvertMarkupToDocbook_cannotConvert;
  public static String ConvertMarkupToDocbook_detailsFollow;
  public static String ConvertMarkupToDocbook_fileExistsOverwrite;
  public static String ConvertMarkupToDocbook_overwrite;
  public static String ConvertMarkupToEclipseHelp_cannotCompleteOperation;
  public static String ConvertMarkupToEclipseHelp_cannotConvert;
  public static String ConvertMarkupToEclipseHelp_detailsFollow;
  public static String ConvertMarkupToEclipseHelp_fileExistsOverwrite;
  public static String ConvertMarkupToEclipseHelp_overwrite;
  public static String ConvertMarkupToHtml_cannotCompleteOperation;
  public static String ConvertMarkupToHtml_cannotConvert;
  public static String ConvertMarkupToHtml_detailsFollow;
  public static String ConvertMarkupToHtml_fileExistsOverwrite;
  public static String ConvertMarkupToHtml_overwrite;
  
  static
  {
    NLS.initializeMessages("org.eclipse.mylyn.wikitext.ui.commands.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.commands.Messages
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;

class WikiTextSourceEditor$7
  extends JobChangeAdapter
{
  WikiTextSourceEditor$7(WikiTextSourceEditor paramWikiTextSourceEditor) {}
  
  public void scheduled(IJobChangeEvent event)
  {
    synchronized (this$0)
    {
      WikiTextSourceEditor.access$5(this$0, true);
    }
  }
  
  public void done(IJobChangeEvent event)
  {
    synchronized (this$0)
    {
      WikiTextSourceEditor.access$5(this$0, false);
      WikiTextSourceEditor.access$8(this$0, null);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextSourceEditor.7
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;

public abstract class AbstractWikiTextSourceEditorOutline
  extends ContentOutlinePage
{
  private IEditorPart editor;
  private final IPropertyListener editorPropertyListener = new IPropertyListener()
  {
    public void propertyChanged(Object source, int propId)
    {
      editorPropertyChanged(source, propId);
    }
  };
  
  public void setEditor(IEditorPart editor)
  {
    if (this.editor != null) {
      this.editor.removePropertyListener(editorPropertyListener);
    }
    this.editor = editor;
    if (this.editor != null) {
      this.editor.addPropertyListener(editorPropertyListener);
    }
  }
  
  public IEditorPart getEditor()
  {
    return editor;
  }
  
  protected void editorPropertyChanged(Object source, int propId) {}
  
  public void dispose()
  {
    setEditor(null);
    super.dispose();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.AbstractWikiTextSourceEditorOutline
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

class DefaultWikiTextSourceEditorOutline$3
  extends ToolTip
{
  DefaultWikiTextSourceEditorOutline$3(DefaultWikiTextSourceEditorOutline paramDefaultWikiTextSourceEditorOutline, Control $anonymous0, int $anonymous1, boolean $anonymous2)
  {
    super($anonymous0, $anonymous1, $anonymous2);
  }
  
  protected Composite createToolTipContentArea(Event event, Composite parent)
  {
    Composite comp = new Composite(parent, 0);
    comp.setBackground(parent.getDisplay().getSystemColor(29));
    
    GridLayout gl = new GridLayout(1, false);
    marginBottom = 2;
    marginTop = 2;
    marginHeight = 0;
    marginWidth = 0;
    marginLeft = 2;
    marginRight = 2;
    verticalSpacing = 1;
    comp.setLayout(gl);
    
    Object tipItem = getToolTipItem(new Point(x, y));
    if ((tipItem instanceof OutlineItem))
    {
      OutlineItem outlineItem = (OutlineItem)tipItem;
      Label label = new Label(comp, 64);
      label.setBackground(comp.getBackground());
      label.setText(outlineItem.getTooltip());
    }
    return comp;
  }
  
  protected boolean shouldCreateToolTip(Event event)
  {
    Object eventItem = getToolTipItem(new Point(x, y));
    boolean shouldCreate = (eventItem != null) && ((eventItem instanceof OutlineItem)) && 
      (super.shouldCreateToolTip(event));
    if (!shouldCreate) {
      hide();
    }
    return shouldCreate;
  }
  
  protected Object getToolTipItem(Point point)
  {
    TreeItem item = ((Tree)DefaultWikiTextSourceEditorOutline.access$1(this$0).getControl()).getItem(point);
    if (item != null) {
      return item.getData();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.DefaultWikiTextSourceEditorOutline.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.FontRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.DefaultTextHover;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.information.IInformationPresenter;
import org.eclipse.jface.text.information.IInformationProvider;
import org.eclipse.jface.text.information.IInformationProviderExtension;
import org.eclipse.jface.text.information.IInformationProviderExtension2;
import org.eclipse.jface.text.information.InformationPresenter;
import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.reconciler.IReconciler;
import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
import org.eclipse.jface.text.reconciler.MonoReconciler;
import org.eclipse.jface.text.rules.ITokenScanner;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.mylyn.internal.wikitext.ui.WikiTextUiPlugin;
import org.eclipse.mylyn.internal.wikitext.ui.editor.assist.AnchorCompletionProcessor;
import org.eclipse.mylyn.internal.wikitext.ui.editor.assist.MarkupTemplateCompletionProcessor;
import org.eclipse.mylyn.internal.wikitext.ui.editor.assist.MultiplexingContentAssistProcessor;
import org.eclipse.mylyn.internal.wikitext.ui.editor.outline.QuickOutlinePopupDialog;
import org.eclipse.mylyn.internal.wikitext.ui.editor.reconciler.MarkupMonoReconciler;
import org.eclipse.mylyn.internal.wikitext.ui.editor.reconciler.MarkupValidationReconcilingStrategy;
import org.eclipse.mylyn.internal.wikitext.ui.editor.reconciler.MultiReconcilingStrategy;
import org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner;
import org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.MarkupDamagerRepairer;
import org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.MarkupHyperlinkDetector;
import org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.MarkupTokenScanner;
import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineParser;
import org.eclipse.mylyn.wikitext.ui.viewer.AbstractTextSourceViewerConfiguration;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.IShowInTarget;
import org.eclipse.ui.texteditor.HippieProposalProcessor;
import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;

public class MarkupSourceViewerConfiguration
  extends AbstractTextSourceViewerConfiguration
{
  private MarkupTokenScanner scanner;
  private MarkupTemplateCompletionProcessor completionProcessor;
  private AnchorCompletionProcessor anchorCompletionProcessor;
  private MarkupLanguage markupLanguage;
  private MarkupValidationReconcilingStrategy markupValidationReconcilingStrategy;
  private IFile file;
  private ITextHover textHover;
  private OutlineItem outline;
  private Font defaultFont;
  private Font defaultMonospaceFont;
  private InformationPresenter informationPresenter;
  private IShowInTarget showInTarget;
  private String fontPreference;
  private String monospaceFontPreference;
  private MarkupHyperlinkDetector markupHyperlinkDetector;
  private boolean enableHippieContentAssist = true;
  private boolean enableSelfContainedIncrementalFind = false;
  
  public MarkupSourceViewerConfiguration(IPreferenceStore preferenceStore, String textFontPreference, String monospaceFontPreference)
  {
    super(preferenceStore);
    fontPreference = textFontPreference;
    this.monospaceFontPreference = monospaceFontPreference;
    initializeDefaultFonts();
  }
  
  public MarkupSourceViewerConfiguration(IPreferenceStore preferenceStore)
  {
    this(preferenceStore, "org.eclipse.mylyn.wikitext.ui.presentation.textFont", "org.eclipse.mylyn.wikitext.ui.presentation.monospaceFont");
  }
  
  protected List<IHyperlinkDetector> createCustomHyperlinkDetectors(ISourceViewer sourceViewer)
  {
    List<IHyperlinkDetector> detectors = new ArrayList();
    if (markupHyperlinkDetector == null)
    {
      markupHyperlinkDetector = new MarkupHyperlinkDetector();
      markupHyperlinkDetector.setMarkupLanguage(markupLanguage);
      markupHyperlinkDetector.setFile(file);
    }
    detectors.add(markupHyperlinkDetector);
    detectors.addAll(super.createCustomHyperlinkDetectors(sourceViewer));
    return detectors;
  }
  
  public void initializeDefaultFonts()
  {
    Font defaultFont = null;
    Font defaultMonospaceFont = null;
    if (WikiTextUiPlugin.getDefault() != null)
    {
      IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
      FontRegistry fontRegistry = themeManager.getCurrentTheme().getFontRegistry();
      defaultFont = fontRegistry.get(fontPreference);
      defaultMonospaceFont = fontRegistry.get(monospaceFontPreference);
    }
    if (defaultFont == null) {
      defaultFont = JFaceResources.getDefaultFont();
    }
    if ((this.defaultFont != defaultFont) || (this.defaultMonospaceFont != defaultMonospaceFont))
    {
      this.defaultFont = defaultFont;
      this.defaultMonospaceFont = defaultMonospaceFont;
      if (scanner != null) {
        scanner.resetFonts(defaultFont, defaultMonospaceFont);
      }
    }
  }
  
  public String getFontPreference()
  {
    return fontPreference;
  }
  
  public void setFontPreference(String textFontPreference)
  {
    fontPreference = textFontPreference;
  }
  
  public String getMonospaceFontPreference()
  {
    return monospaceFontPreference;
  }
  
  public void setMonospaceFontPreference(String monospaceFontPreference)
  {
    this.monospaceFontPreference = monospaceFontPreference;
  }
  
  public ITokenScanner getMarkupScanner()
  {
    if (scanner == null) {
      scanner = new MarkupTokenScanner(defaultFont, defaultMonospaceFont);
    }
    return scanner;
  }
  
  public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
  {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    
    MarkupDamagerRepairer damagerRepairer = new MarkupDamagerRepairer(getMarkupScanner());
    String[] arrayOfString;
    int j = (arrayOfString = FastMarkupPartitioner.ALL_CONTENT_TYPES).length;
    for (int i = 0; i < j; i++)
    {
      String partitionType = arrayOfString[i];
      reconciler.setDamager(damagerRepairer, partitionType);
      reconciler.setRepairer(damagerRepairer, partitionType);
    }
    reconciler.setDamager(damagerRepairer, "__dftl_partition_content_type");
    reconciler.setRepairer(damagerRepairer, "__dftl_partition_content_type");
    
    return reconciler;
  }
  
  public IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
  {
    if (completionProcessor == null)
    {
      completionProcessor = new MarkupTemplateCompletionProcessor();
      completionProcessor.setMarkupLanguage(markupLanguage);
    }
    if ((anchorCompletionProcessor == null) && (outline != null))
    {
      anchorCompletionProcessor = new AnchorCompletionProcessor();
      anchorCompletionProcessor.setOutline(outline);
    }
    MultiplexingContentAssistProcessor processor = new MultiplexingContentAssistProcessor();
    if (anchorCompletionProcessor != null) {
      processor.addDelegate(anchorCompletionProcessor);
    }
    processor.addDelegate(completionProcessor);
    if (enableHippieContentAssist)
    {
      HippieProposalProcessor hippieProcessor = new HippieProposalProcessor();
      processor.addDelegate(hippieProcessor);
    }
    IContentAssistProcessor[] processors = createContentAssistProcessors();
    if (processors != null)
    {
      IContentAssistProcessor[] arrayOfIContentAssistProcessor1;
      j = (arrayOfIContentAssistProcessor1 = processors).length;
      for (int i = 0; i < j; i++)
      {
        IContentAssistProcessor cap = arrayOfIContentAssistProcessor1[i];
        processor.addDelegate(cap);
      }
    }
    ContentAssistant assistant = new ContentAssistant();
    assistant.enableAutoActivation(true);
    assistant.enableAutoInsert(true);
    assistant.setContentAssistProcessor(processor, "__dftl_partition_content_type");
    String[] arrayOfString;
    int k = (arrayOfString = FastMarkupPartitioner.ALL_CONTENT_TYPES).length;
    for (int j = 0; j < k; j++)
    {
      String partitionType = arrayOfString[j];
      assistant.setContentAssistProcessor(processor, partitionType);
    }
    return assistant;
  }
  
  protected IContentAssistProcessor[] createContentAssistProcessors()
  {
    return null;
  }
  
  public void setMarkupLanguage(MarkupLanguage markupLanguage)
  {
    this.markupLanguage = markupLanguage;
    if (completionProcessor != null) {
      completionProcessor.setMarkupLanguage(markupLanguage);
    }
    if (markupValidationReconcilingStrategy != null) {
      markupValidationReconcilingStrategy.setMarkupLanguage(markupLanguage);
    }
    if (markupHyperlinkDetector != null) {
      markupHyperlinkDetector.setMarkupLanguage(markupLanguage);
    }
  }
  
  public IReconciler getReconciler(ISourceViewer sourceViewer)
  {
    if (markupValidationReconcilingStrategy == null)
    {
      markupValidationReconcilingStrategy = new MarkupValidationReconcilingStrategy(sourceViewer);
      markupValidationReconcilingStrategy.setMarkupLanguage(markupLanguage);
      markupValidationReconcilingStrategy.setResource(file);
    }
    IReconciler reconciler = super.getReconciler(sourceViewer);
    IReconcilingStrategy strategy;
    IReconcilingStrategy strategy;
    if (reconciler != null)
    {
      MultiReconcilingStrategy multiStrategy = new MultiReconcilingStrategy();
      String[] arrayOfString;
      int j = (arrayOfString = FastMarkupPartitioner.ALL_CONTENT_TYPES).length;
      for (int i = 0; i < j; i++)
      {
        String contentType = arrayOfString[i];
        maybeAddReconcilingStrategyForContentType(multiStrategy, reconciler, contentType);
      }
      maybeAddReconcilingStrategyForContentType(multiStrategy, reconciler, "__dftl_partition_content_type");
      multiStrategy.add(markupValidationReconcilingStrategy);
      strategy = multiStrategy;
    }
    else
    {
      strategy = markupValidationReconcilingStrategy;
    }
    MonoReconciler reconciler = new MarkupMonoReconciler(strategy, false);
    reconciler.setIsIncrementalReconciler(false);
    reconciler.setProgressMonitor(new NullProgressMonitor());
    reconciler.setDelay(500);
    return reconciler;
  }
  
  private void maybeAddReconcilingStrategyForContentType(MultiReconcilingStrategy multiStrategy, IReconciler reconciler, String contentType)
  {
    IReconcilingStrategy reconcilingStrategy = reconciler.getReconcilingStrategy(contentType);
    if ((reconcilingStrategy != null) && (!multiStrategy.contains(reconcilingStrategy))) {
      multiStrategy.add(reconcilingStrategy);
    }
  }
  
  public void setFile(IFile file)
  {
    this.file = file;
    if (markupValidationReconcilingStrategy != null) {
      markupValidationReconcilingStrategy.setResource(file);
    }
    if (markupHyperlinkDetector != null) {
      markupHyperlinkDetector.setFile(file);
    }
  }
  
  public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType)
  {
    if (textHover == null) {
      textHover = new DefaultTextHover(sourceViewer);
    }
    return textHover;
  }
  
  public IInformationPresenter getOutlineInformationPresenter(ISourceViewer sourceViewer)
  {
    if (informationPresenter == null)
    {
      IInformationControlCreator controlCreator = getOutlineInformationControlCreator();
      informationPresenter = new InformationPresenter(controlCreator);
      informationPresenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
      
      IInformationProvider provider = new InformationProvider(controlCreator);
      String[] contentTypes = getConfiguredContentTypes(sourceViewer);
      String[] arrayOfString1;
      int j = (arrayOfString1 = contentTypes).length;
      for (int i = 0; i < j; i++)
      {
        String contentType = arrayOfString1[i];
        informationPresenter.setInformationProvider(provider, contentType);
      }
      informationPresenter.setSizeConstraints(60, 20, true, true);
    }
    return informationPresenter;
  }
  
  public String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
  {
    List<String> contentTypes = new ArrayList(3);
    contentTypes.addAll(Arrays.asList(FastMarkupPartitioner.ALL_CONTENT_TYPES));
    contentTypes.add("__dftl_partition_content_type");
    return (String[])contentTypes.toArray(new String[contentTypes.size()]);
  }
  
  protected IInformationControlCreator getOutlineInformationControlCreator()
  {
    new IInformationControlCreator()
    {
      public IInformationControl createInformationControl(Shell parent)
      {
        QuickOutlinePopupDialog dialog = new QuickOutlinePopupDialog(parent, showInTarget);
        return dialog;
      }
    };
  }
  
  public void setOutline(OutlineItem outlineModel)
  {
    outline = outlineModel;
    if (anchorCompletionProcessor != null) {
      anchorCompletionProcessor.setOutline(outline);
    }
  }
  
  public Font getDefaultFont()
  {
    return defaultFont;
  }
  
  public void setDefaultFont(Font defaultFont)
  {
    if (defaultFont == null) {
      throw new IllegalArgumentException();
    }
    if (defaultFont != this.defaultFont)
    {
      this.defaultFont = defaultFont;
      if (scanner != null) {
        scanner.resetFonts(defaultFont, defaultMonospaceFont);
      }
    }
  }
  
  public Font getDefaultMonospaceFont()
  {
    return defaultMonospaceFont;
  }
  
  public void setDefaultMonospaceFont(Font defaultMonospaceFont)
  {
    if (this.defaultMonospaceFont != defaultMonospaceFont)
    {
      this.defaultMonospaceFont = defaultMonospaceFont;
      if (scanner != null) {
        scanner.resetFonts(defaultFont, defaultMonospaceFont);
      }
    }
  }
  
  public IShowInTarget getShowInTarget()
  {
    return showInTarget;
  }
  
  public void setShowInTarget(IShowInTarget showInTarget)
  {
    this.showInTarget = showInTarget;
  }
  
  private class InformationProvider
    implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2
  {
    private final IInformationControlCreator controlCreator;
    
    public InformationProvider(IInformationControlCreator controlCreator)
    {
      this.controlCreator = controlCreator;
    }
    
    @Deprecated
    public String getInformation(ITextViewer textViewer, IRegion subject)
    {
      return getInformation2(textViewer, subject).toString();
    }
    
    public Object getInformation2(ITextViewer textViewer, IRegion subject)
    {
      if (MarkupSourceViewerConfiguration.this.outline == null) {
        if (markupLanguage != null)
        {
          IDocument document = textViewer.getDocument();
          if ((document != null) && (document.getLength() > 0))
          {
            MarkupLanguage language = markupLanguage.clone();
            OutlineParser outlineParser = new OutlineParser();
            outlineParser.setMarkupLanguage(language.clone());
            String markup = document.get();
            OutlineItem outline = outlineParser.parse(markup);
            if (file != null) {
              outline.setResourcePath(file.getFullPath().toString());
            }
            return outline;
          }
        }
      }
      return MarkupSourceViewerConfiguration.this.outline;
    }
    
    public IRegion getSubject(ITextViewer textViewer, int offset)
    {
      return new Region(offset, 0);
    }
    
    public IInformationControlCreator getInformationPresenterControlCreator()
    {
      return controlCreator;
    }
  }
  
  public boolean isEnableHippieContentAssist()
  {
    return enableHippieContentAssist;
  }
  
  public void setEnableHippieContentAssist(boolean enableHippieContentAssist)
  {
    this.enableHippieContentAssist = enableHippieContentAssist;
  }
  
  public boolean isEnableSelfContainedIncrementalFind()
  {
    return enableSelfContainedIncrementalFind;
  }
  
  public void setEnableSelfContainedIncrementalFind(boolean enableSelfContainedIncrementalFind)
  {
    this.enableSelfContainedIncrementalFind = enableSelfContainedIncrementalFind;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.MarkupSourceViewerConfiguration
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class WikiTextSourceEditor$1
  extends SelectionAdapter
{
  WikiTextSourceEditor$1(WikiTextSourceEditor paramWikiTextSourceEditor) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    WikiTextSourceEditor.access$0(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextSourceEditor.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineParser;
import org.eclipse.swt.widgets.Display;

class WikiTextSourceEditor$8
  extends Job
{
  WikiTextSourceEditor$8(WikiTextSourceEditor paramWikiTextSourceEditor, String $anonymous0, MarkupLanguage paramMarkupLanguage, String paramString1, Display paramDisplay, int paramInt)
  {
    super($anonymous0);
  }
  
  protected IStatus run(IProgressMonitor monitor)
  {
    WikiTextSourceEditor.access$9(this$0).setMarkupLanguage(val$language);
    if (shouldCancel()) {
      return Status.CANCEL_STATUS;
    }
    final OutlineItem rootItem = WikiTextSourceEditor.access$9(this$0).parse(val$content);
    if (shouldCancel()) {
      return Status.CANCEL_STATUS;
    }
    val$display.asyncExec(new Runnable()
    {
      public void run()
      {
        WikiTextSourceEditor.access$10(this$0, val$contentGeneration, rootItem);
      }
    });
    return Status.OK_STATUS;
  }
  
  private boolean shouldCancel()
  {
    synchronized (this$0)
    {
      if (val$contentGeneration != WikiTextSourceEditor.access$2(this$0)) {
        return true;
      }
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextSourceEditor.8
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;

class DefaultWikiTextSourceEditorOutline$4
  implements IMenuListener
{
  DefaultWikiTextSourceEditorOutline$4(DefaultWikiTextSourceEditorOutline paramDefaultWikiTextSourceEditorOutline) {}
  
  public void menuAboutToShow(IMenuManager menuManager)
  {
    DefaultWikiTextSourceEditorOutline.access$2(this$0, menuManager);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.DefaultWikiTextSourceEditorOutline.4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.mylyn.internal.wikitext.ui.editor.outline.QuickOutlinePopupDialog;
import org.eclipse.swt.widgets.Shell;

class MarkupSourceViewerConfiguration$1
  implements IInformationControlCreator
{
  MarkupSourceViewerConfiguration$1(MarkupSourceViewerConfiguration paramMarkupSourceViewerConfiguration) {}
  
  public IInformationControl createInformationControl(Shell parent)
  {
    QuickOutlinePopupDialog dialog = new QuickOutlinePopupDialog(parent, MarkupSourceViewerConfiguration.access$3(this$0));
    return dialog;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.MarkupSourceViewerConfiguration.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;

public abstract interface WikiTextDocumentProvider
{
  public abstract void setMarkupLanguage(MarkupLanguage paramMarkupLanguage);
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextDocumentProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.AnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage;
import org.eclipse.ui.editors.text.StorageDocumentProvider;
import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;

public abstract class AbstractWikiTextDocumentProvider
  extends StorageDocumentProvider
  implements WikiTextDocumentProvider
{
  private MarkupLanguage markupLanguage;
  
  protected void setupDocument(Object element, IDocument document)
  {
    super.setupDocument(element, document);
    WikiTextSourcePartitioning.configurePartitioning(document, markupLanguage);
  }
  
  public MarkupLanguage getMarkupLanguage()
  {
    return markupLanguage;
  }
  
  public void setMarkupLanguage(MarkupLanguage markupLanguage)
  {
    this.markupLanguage = markupLanguage;
  }
  
  protected IAnnotationModel createAnnotationModel(Object element)
    throws CoreException
  {
    if ((element instanceof IAdaptable))
    {
      IFile file = (IFile)((IAdaptable)element).getAdapter(IFile.class);
      if (file != null) {
        return new ResourceMarkerAnnotationModel(file);
      }
    }
    return new AnnotationModel();
  }
  
  protected abstract void doSaveDocument(IProgressMonitor paramIProgressMonitor, Object paramObject, IDocument paramIDocument, boolean paramBoolean)
    throws CoreException;
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.AbstractWikiTextDocumentProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;

class WikiTextSourceEditor$2
  extends KeyAdapter
{
  WikiTextSourceEditor$2(WikiTextSourceEditor paramWikiTextSourceEditor) {}
  
  public void keyReleased(KeyEvent e)
  {
    if (isRelevantKeyCode(keyCode)) {
      WikiTextSourceEditor.access$0(this$0);
    }
  }
  
  private boolean isRelevantKeyCode(int keyCode)
  {
    switch (keyCode)
    {
    case 16777217: 
    case 16777218: 
    case 16777219: 
    case 16777220: 
    case 16777221: 
    case 16777222: 
      return true;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextSourceEditor.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.swt.widgets.Control;

class DefaultWikiTextSourceEditorOutline$5
  implements Runnable
{
  DefaultWikiTextSourceEditorOutline$5(DefaultWikiTextSourceEditorOutline paramDefaultWikiTextSourceEditorOutline) {}
  
  public void run()
  {
    if ((this$0.getControl() != null) && (!this$0.getControl().isDisposed()) && (this$0.getEditor() != null)) {
      DefaultWikiTextSourceEditorOutline.access$3(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.DefaultWikiTextSourceEditorOutline.5
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;

class WikiTextSourceEditor$3
  extends MouseAdapter
{
  WikiTextSourceEditor$3(WikiTextSourceEditor paramWikiTextSourceEditor) {}
  
  public void mouseUp(MouseEvent e)
  {
    WikiTextSourceEditor.access$0(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.WikiTextSourceEditor.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
import org.eclipse.ui.part.IShowInTarget;
import org.eclipse.ui.part.ShowInContext;

public class ShowInTargetBridge
  implements IShowInTarget
{
  private final SourceViewer viewer;
  
  public ShowInTargetBridge(SourceViewer viewer)
  {
    this.viewer = viewer;
  }
  
  public boolean show(ShowInContext context)
  {
    ISelection selection = context.getSelection();
    if ((selection instanceof IStructuredSelection))
    {
      Object[] arrayOfObject;
      int j = (arrayOfObject = ((IStructuredSelection)selection).toArray()).length;
      for (int i = 0; i < j; i++)
      {
        Object element = arrayOfObject[i];
        if ((element instanceof OutlineItem))
        {
          OutlineItem item = (OutlineItem)element;
          viewer.setSelection(new TextSelection(item.getOffset(), item.getLength()), true);
          return true;
        }
      }
    }
    else if ((selection instanceof ITextSelection))
    {
      viewer.setSelection(selection, true);
      return true;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.wikitext.ui.editor.ShowInTargetBridge
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.wikitext.ui.editor;

import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.model.BaseWorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.ISho
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd