org.eclipse.jface.text_3.7.2.v20111213-1208

16:45:28.776 INFO  jd.cli.Main - Decompiling org.eclipse.jface.text_3.7.2.v20111213-1208.jar
package org.eclipse.jface.contentassist;

import java.io.PrintStream;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class AbstractControlContentAssistSubjectAdapter$1
  implements Listener
{
  final AbstractControlContentAssistSubjectAdapter this$0;
  
  AbstractControlContentAssistSubjectAdapter$1(AbstractControlContentAssistSubjectAdapter paramAbstractControlContentAssistSubjectAdapter)
  {
    this$0 = paramAbstractControlContentAssistSubjectAdapter;
  }
  
  public void handleEvent(Event e)
  {
    if (!this$0.getControl().isFocusControl()) {
      return;
    }
    VerifyEvent verifyEvent = new VerifyEvent(e);
    KeyEvent keyEvent = new KeyEvent(e);
    switch (type)
    {
    case 31: 
      if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
        dump("before traverse", e, verifyEvent);
      }
      doit = true;
      for (Iterator iter = AbstractControlContentAssistSubjectAdapter.access$0(this$0).iterator(); iter.hasNext();)
      {
        ((VerifyKeyListener)iter.next()).verifyKey(verifyEvent);
        if (!doit)
        {
          detail = 0;
          doit = true;
          if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
            dump("traverse eaten by verify", e, verifyEvent);
          }
          return;
        }
        if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
          dump("traverse OK", e, verifyEvent);
        }
      }
      break;
    case 1: 
      for (Iterator iter = AbstractControlContentAssistSubjectAdapter.access$0(this$0).iterator(); iter.hasNext();)
      {
        ((VerifyKeyListener)iter.next()).verifyKey(verifyEvent);
        if (!doit)
        {
          doit = doit;
          if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
            dump("keyDown eaten by verify", e, verifyEvent);
          }
          return;
        }
      }
      if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
        dump("keyDown OK", e, verifyEvent);
      }
      for (Iterator iter = AbstractControlContentAssistSubjectAdapter.access$1(this$0).iterator(); iter.hasNext();) {
        ((KeyListener)iter.next()).keyPressed(keyEvent);
      }
      break;
    default: 
      Assert.isTrue(false);
    }
  }
  
  private void dump(String who, Event e, VerifyEvent ve)
  {
    StringBuffer sb = new StringBuffer("--- [AbstractControlContentAssistSubjectAdapter]\n");
    sb.append(who);
    sb.append(" - e: keyCode=" + keyCode + hex(keyCode));
    sb.append("; character=" + character + hex(character));
    sb.append("; stateMask=" + stateMask + hex(stateMask));
    sb.append("; doit=" + doit);
    sb.append("; detail=" + detail + hex(detail));
    sb.append("; widget=" + widget);
    sb.append("\n");
    sb.append("  verifyEvent keyCode=" + keyCode + hex(keyCode));
    sb.append("; character=" + character + hex(character));
    sb.append("; stateMask=" + stateMask + hex(stateMask));
    sb.append("; doit=" + doit);
    sb.append("; widget=" + widget);
    System.out.println(sb);
  }
  
  private String hex(int i)
  {
    return "[0x" + Integer.toHexString(i) + ']';
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Image;

class AbstractControlContentAssistSubjectAdapter$2
  implements DisposeListener
{
  final AbstractControlContentAssistSubjectAdapter this$0;
  
  AbstractControlContentAssistSubjectAdapter$2(AbstractControlContentAssistSubjectAdapter paramAbstractControlContentAssistSubjectAdapter)
  {
    this$0 = paramAbstractControlContentAssistSubjectAdapter;
  }
  
  public void widgetDisposed(DisposeEvent e)
  {
    if (AbstractControlContentAssistSubjectAdapter.access$2(this$0) != null)
    {
      AbstractControlContentAssistSubjectAdapter.access$2(this$0).dispose();
      AbstractControlContentAssistSubjectAdapter.access$3(this$0, null);
    }
    if (AbstractControlContentAssistSubjectAdapter.access$4(this$0) != null)
    {
      AbstractControlContentAssistSubjectAdapter.access$4(this$0).dispose();
      AbstractControlContentAssistSubjectAdapter.access$5(this$0, null);
    }
    if (AbstractControlContentAssistSubjectAdapter.access$6(this$0) != null)
    {
      AbstractControlContentAssistSubjectAdapter.access$6(this$0).dispose();
      AbstractControlContentAssistSubjectAdapter.access$7(this$0, null);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.swt.graphics.Image;

class AbstractControlContentAssistSubjectAdapter$3
  implements ILabelProviderListener
{
  final AbstractControlContentAssistSubjectAdapter this$0;
  private final ILabelProvider val$labelProvider;
  
  AbstractControlContentAssistSubjectAdapter$3(AbstractControlContentAssistSubjectAdapter paramAbstractControlContentAssistSubjectAdapter, ILabelProvider paramILabelProvider)
  {
    this$0 = paramAbstractControlContentAssistSubjectAdapter;val$labelProvider = paramILabelProvider;
  }
  
  public void labelProviderChanged(LabelProviderChangedEvent event)
  {
    AbstractControlContentAssistSubjectAdapter.access$4(this$0).setDescriptionText(val$labelProvider.getText(this$0.getControl()));
    Image image = val$labelProvider.getImage(this$0.getControl());
    if (image == null) {
      image = AbstractControlContentAssistSubjectAdapter.access$8(this$0);
    }
    AbstractControlContentAssistSubjectAdapter.access$4(this$0).setImage(image);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.IEventConsumer;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

/**
 * @deprecated
 */
public abstract class AbstractControlContentAssistSubjectAdapter
  implements IContentAssistSubjectControl
{
  protected static final boolean DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/ContentAssistSubjectAdapters"));
  private List fVerifyKeyListeners;
  private Set fKeyListeners;
  private Listener fControlListener;
  private ILabelProvider fCueLabelProvider;
  private ControlDecoration fControlDecoration;
  private Image fCachedDefaultCueImage;
  
  public AbstractControlContentAssistSubjectAdapter()
  {
    fVerifyKeyListeners = new ArrayList(1);
    fKeyListeners = new HashSet(1);
  }
  
  public abstract Control getControl();
  
  public void addKeyListener(KeyListener keyListener)
  {
    fKeyListeners.add(keyListener);
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#addKeyListener()");
    }
    installControlListener();
  }
  
  public void removeKeyListener(KeyListener keyListener)
  {
    boolean deleted = fKeyListeners.remove(keyListener);
    if (DEBUG)
    {
      if (!deleted) {
        System.out.println("removeKeyListener -> wasn't here");
      }
      System.out.println("AbstractControlContentAssistSubjectAdapter#removeKeyListener() -> " + fKeyListeners.size());
    }
    uninstallControlListener();
  }
  
  public boolean supportsVerifyKeyListener()
  {
    return true;
  }
  
  public boolean appendVerifyKeyListener(VerifyKeyListener verifyKeyListener)
  {
    fVerifyKeyListeners.add(verifyKeyListener);
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#appendVerifyKeyListener() -> " + fVerifyKeyListeners.size());
    }
    installControlListener();
    return true;
  }
  
  public boolean prependVerifyKeyListener(VerifyKeyListener verifyKeyListener)
  {
    fVerifyKeyListeners.add(0, verifyKeyListener);
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#prependVerifyKeyListener() -> " + fVerifyKeyListeners.size());
    }
    installControlListener();
    return true;
  }
  
  public void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener)
  {
    fVerifyKeyListeners.remove(verifyKeyListener);
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#removeVerifyKeyListener() -> " + fVerifyKeyListeners.size());
    }
    uninstallControlListener();
  }
  
  public void setEventConsumer(IEventConsumer eventConsumer)
  {
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#setEventConsumer()");
    }
  }
  
  public String getLineDelimiter()
  {
    return System.getProperty("line.separator");
  }
  
  private void installControlListener()
  {
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#installControlListener() -> k: " + fKeyListeners.size() + ", v: " + fVerifyKeyListeners.size());
    }
    if (fControlListener != null) {
      return;
    }
    fControlListener = new Listener()
    {
      public void handleEvent(Event e)
      {
        if (!getControl().isFocusControl()) {
          return;
        }
        VerifyEvent verifyEvent = new VerifyEvent(e);
        KeyEvent keyEvent = new KeyEvent(e);
        switch (type)
        {
        case 31: 
          if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
            dump("before traverse", e, verifyEvent);
          }
          doit = true;
          for (Iterator iter = fVerifyKeyListeners.iterator(); iter.hasNext();)
          {
            ((VerifyKeyListener)iter.next()).verifyKey(verifyEvent);
            if (!doit)
            {
              detail = 0;
              doit = true;
              if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
                dump("traverse eaten by verify", e, verifyEvent);
              }
              return;
            }
            if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
              dump("traverse OK", e, verifyEvent);
            }
          }
          break;
        case 1: 
          for (Iterator iter = fVerifyKeyListeners.iterator(); iter.hasNext();)
          {
            ((VerifyKeyListener)iter.next()).verifyKey(verifyEvent);
            if (!doit)
            {
              doit = doit;
              if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
                dump("keyDown eaten by verify", e, verifyEvent);
              }
              return;
            }
          }
          if (AbstractControlContentAssistSubjectAdapter.DEBUG) {
            dump("keyDown OK", e, verifyEvent);
          }
          for (Iterator iter = fKeyListeners.iterator(); iter.hasNext();) {
            ((KeyListener)iter.next()).keyPressed(keyEvent);
          }
          break;
        default: 
          Assert.isTrue(false);
        }
      }
      
      private void dump(String who, Event e, VerifyEvent ve)
      {
        StringBuffer sb = new StringBuffer("--- [AbstractControlContentAssistSubjectAdapter]\n");
        sb.append(who);
        sb.append(" - e: keyCode=" + keyCode + hex(keyCode));
        sb.append("; character=" + character + hex(character));
        sb.append("; stateMask=" + stateMask + hex(stateMask));
        sb.append("; doit=" + doit);
        sb.append("; detail=" + detail + hex(detail));
        sb.append("; widget=" + widget);
        sb.append("\n");
        sb.append("  verifyEvent keyCode=" + keyCode + hex(keyCode));
        sb.append("; character=" + character + hex(character));
        sb.append("; stateMask=" + stateMask + hex(stateMask));
        sb.append("; doit=" + doit);
        sb.append("; widget=" + widget);
        System.out.println(sb);
      }
      
      private String hex(int i)
      {
        return "[0x" + Integer.toHexString(i) + ']';
      }
    };
    getControl().addListener(31, fControlListener);
    getControl().addListener(1, fControlListener);
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#installControlListener() - installed");
    }
  }
  
  private void uninstallControlListener()
  {
    if ((fControlListener == null) || (fKeyListeners.size() + fVerifyKeyListeners.size() != 0))
    {
      if (DEBUG) {
        System.out.println("AbstractControlContentAssistSubjectAdapter#uninstallControlListener() -> k: " + fKeyListeners.size() + ", v: " + fVerifyKeyListeners.size());
      }
      return;
    }
    getControl().removeListener(31, fControlListener);
    getControl().removeListener(1, fControlListener);
    fControlListener = null;
    if (DEBUG) {
      System.out.println("AbstractControlContentAssistSubjectAdapter#uninstallControlListener() - done");
    }
  }
  
  public void setContentAssistCueProvider(ILabelProvider labelProvider)
  {
    if (fCueLabelProvider != null) {
      fCueLabelProvider.dispose();
    }
    fCueLabelProvider = labelProvider;
    if (labelProvider == null)
    {
      if (fControlDecoration != null)
      {
        fControlDecoration.dispose();
        fControlDecoration = null;
      }
    }
    else
    {
      if (fControlDecoration == null)
      {
        fControlDecoration = new ControlDecoration(getControl(), 16512);
        getControl().addDisposeListener(new DisposeListener()
        {
          public void widgetDisposed(DisposeEvent e)
          {
            if (fCueLabelProvider != null)
            {
              fCueLabelProvider.dispose();
              fCueLabelProvider = null;
            }
            if (fControlDecoration != null)
            {
              fControlDecoration.dispose();
              fControlDecoration = null;
            }
            if (fCachedDefaultCueImage != null)
            {
              fCachedDefaultCueImage.dispose();
              fCachedDefaultCueImage = null;
            }
          }
        });
        fControlDecoration.setShowHover(true);
        fControlDecoration.setShowOnlyOnFocus(true);
      }
      ILabelProviderListener listener = new ILabelProviderListener()
      {
        private final ILabelProvider val$labelProvider;
        
        public void labelProviderChanged(LabelProviderChangedEvent event)
        {
          fControlDecoration.setDescriptionText(val$labelProvider.getText(getControl()));
          Image image = val$labelProvider.getImage(getControl());
          if (image == null) {
            image = AbstractControlContentAssistSubjectAdapter.this.getDefaultCueImage();
          }
          fControlDecoration.setImage(image);
        }
      };
      labelProvider.addListener(listener);
      
      listener.labelProviderChanged(new LabelProviderChangedEvent(labelProvider));
    }
  }
  
  private Image getDefaultCueImage()
  {
    if (fCachedDefaultCueImage == null)
    {
      ImageDescriptor cueID = ImageDescriptor.createFromFile(AbstractControlContentAssistSubjectAdapter.class, "images/content_assist_cue.gif");
      fCachedDefaultCueImage = cueID.createImage(getControl().getDisplay());
    }
    return fCachedDefaultCueImage;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Combo;

class ComboContentAssistSubjectAdapter$1
  implements ModifyListener
{
  final ComboContentAssistSubjectAdapter.InternalDocument this$1;
  
  ComboContentAssistSubjectAdapter$1(ComboContentAssistSubjectAdapter.InternalDocument paramInternalDocument)
  {
    this$1 = paramInternalDocument;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$1.set(ComboContentAssistSubjectAdapter.access$0(ComboContentAssistSubjectAdapter.InternalDocument.access$1(this$1)).getText());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ComboContentAssistSubjectAdapter.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class ComboContentAssistSubjectAdapter$2
  implements Listener
{
  final ComboContentAssistSubjectAdapter this$0;
  private final SelectionListener val$selectionListener;
  
  ComboContentAssistSubjectAdapter$2(ComboContentAssistSubjectAdapter paramComboContentAssistSubjectAdapter, SelectionListener paramSelectionListener)
  {
    this$0 = paramComboContentAssistSubjectAdapter;val$selectionListener = paramSelectionListener;
  }
  
  public void handleEvent(Event e)
  {
    val$selectionListener.widgetSelected(new SelectionEvent(e));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ComboContentAssistSubjectAdapter.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Combo;

class ComboContentAssistSubjectAdapter$InternalDocument
  extends Document
{
  private ModifyListener fModifyListener;
  final ComboContentAssistSubjectAdapter this$0;
  
  ComboContentAssistSubjectAdapter$InternalDocument(ComboContentAssistSubjectAdapter paramComboContentAssistSubjectAdapter, InternalDocument paramInternalDocument)
  {
    this(paramComboContentAssistSubjectAdapter);
  }
  
  private ComboContentAssistSubjectAdapter$InternalDocument(ComboContentAssistSubjectAdapter paramComboContentAssistSubjectAdapter)
  {
    super(ComboContentAssistSubjectAdapter.access$0(paramComboContentAssistSubjectAdapter).getText());this$0 = paramComboContentAssistSubjectAdapter;
    fModifyListener = new ComboContentAssistSubjectAdapter.1(this);
    
    ComboContentAssistSubjectAdapter.access$0(paramComboContentAssistSubjectAdapter).addModifyListener(fModifyListener);
  }
  
  public void replace(int pos, int length, String text)
    throws BadLocationException
  {
    super.replace(pos, length, text);
    ComboContentAssistSubjectAdapter.access$0(this$0).removeModifyListener(fModifyListener);
    ComboContentAssistSubjectAdapter.access$0(this$0).setText(get());
    ComboContentAssistSubjectAdapter.access$0(this$0).addModifyListener(fModifyListener);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ComboContentAssistSubjectAdapter.InternalDocument
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import java.util.HashMap;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

/**
 * @deprecated
 */
public class ComboContentAssistSubjectAdapter
  extends AbstractControlContentAssistSubjectAdapter
{
  private Combo fCombo;
  private HashMap fModifyListeners;
  
  private class InternalDocument
    extends Document
  {
    private ModifyListener fModifyListener;
    
    InternalDocument(InternalDocument paramInternalDocument)
    {
      this();
    }
    
    private InternalDocument()
    {
      super();
      fModifyListener = new ComboContentAssistSubjectAdapter.1(this);
      
      fCombo.addModifyListener(fModifyListener);
    }
    
    public void replace(int pos, int length, String text)
      throws BadLocationException
    {
      super.replace(pos, length, text);
      fCombo.removeModifyListener(fModifyListener);
      fCombo.setText(get());
      fCombo.addModifyListener(fModifyListener);
    }
  }
  
  public ComboContentAssistSubjectAdapter(Combo combo)
  {
    Assert.isNotNull(combo);
    fCombo = combo;
    fModifyListeners = new HashMap();
  }
  
  public Control getControl()
  {
    return fCombo;
  }
  
  public int getLineHeight()
  {
    return fCombo.getTextHeight();
  }
  
  public int getCaretOffset()
  {
    return fCombo.getSelection().y;
  }
  
  public Point getLocationAtOffset(int offset)
  {
    String comboString = fCombo.getText();
    GC gc = new GC(fCombo);
    gc.setFont(fCombo.getFont());
    Point extent = gc.textExtent(comboString.substring(0, Math.min(offset, comboString.length())));
    int spaceWidth = textExtent" "x;
    gc.dispose();
    
    int x = 2 * spaceWidth + fCombo.getClientArea().x + fCombo.getBorderWidth() + x;
    return new Point(x, fCombo.getClientArea().y);
  }
  
  public Point getWidgetSelectionRange()
  {
    return new Point(fCombo.getSelection().x, Math.abs(fCombo.getSelection().y - fCombo.getSelection().x));
  }
  
  public Point getSelectedRange()
  {
    return new Point(fCombo.getSelection().x, Math.abs(fCombo.getSelection().y - fCombo.getSelection().x));
  }
  
  public IDocument getDocument()
  {
    IDocument document = (IDocument)fCombo.getData("document");
    if (document == null)
    {
      document = new InternalDocument(null);
      fCombo.setData("document", document);
    }
    return document;
  }
  
  public void setSelectedRange(int i, int j)
  {
    fCombo.setSelection(new Point(i, i + j));
  }
  
  public void revealRange(int i, int j)
  {
    fCombo.setSelection(new Point(i, i + j));
  }
  
  public boolean addSelectionListener(SelectionListener selectionListener)
  {
    fCombo.addSelectionListener(selectionListener);
    Listener listener = new Listener()
    {
      private final SelectionListener val$selectionListener;
      
      public void handleEvent(Event e)
      {
        val$selectionListener.widgetSelected(new SelectionEvent(e));
      }
    };
    fCombo.addListener(24, listener);
    fModifyListeners.put(selectionListener, listener);
    return true;
  }
  
  public void removeSelectionListener(SelectionListener selectionListener)
  {
    fCombo.removeSelectionListener(selectionListener);
    Object listener = fModifyListeners.get(selectionListener);
    if ((listener instanceof Listener)) {
      fCombo.removeListener(24, (Listener)listener);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ComboContentAssistSubjectAdapter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IEventConsumer;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;

public abstract interface IContentAssistSubjectControl
{
  public abstract Control getControl();
  
  public abstract int getLineHeight();
  
  public abstract int getCaretOffset();
  
  public abstract Point getLocationAtOffset(int paramInt);
  
  public abstract String getLineDelimiter();
  
  public abstract Point getWidgetSelectionRange();
  
  public abstract Point getSelectedRange();
  
  public abstract void setSelectedRange(int paramInt1, int paramInt2);
  
  public abstract void revealRange(int paramInt1, int paramInt2);
  
  public abstract IDocument getDocument();
  
  public abstract boolean appendVerifyKeyListener(VerifyKeyListener paramVerifyKeyListener);
  
  public abstract boolean prependVerifyKeyListener(VerifyKeyListener paramVerifyKeyListener);
  
  public abstract void removeVerifyKeyListener(VerifyKeyListener paramVerifyKeyListener);
  
  public abstract boolean supportsVerifyKeyListener();
  
  public abstract void addKeyListener(KeyListener paramKeyListener);
  
  public abstract void removeKeyListener(KeyListener paramKeyListener);
  
  public abstract void setEventConsumer(IEventConsumer paramIEventConsumer);
  
  public abstract void removeSelectionListener(SelectionListener paramSelectionListener);
  
  public abstract boolean addSelectionListener(SelectionListener paramSelectionListener);
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.IContentAssistSubjectControl
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;

/**
 * @deprecated
 */
public abstract interface ISubjectControlContentAssistProcessor
  extends IContentAssistProcessor
{
  public abstract ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl paramIContentAssistSubjectControl, int paramInt);
  
  public abstract IContextInformation[] computeContextInformation(IContentAssistSubjectControl paramIContentAssistSubjectControl, int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.contentassist.IContentAssistant;

/**
 * @deprecated
 */
public abstract interface ISubjectControlContentAssistant
  extends IContentAssistant
{
  public abstract void install(IContentAssistSubjectControl paramIContentAssistSubjectControl);
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ISubjectControlContentAssistant
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationPresenter;

/**
 * @deprecated
 */
public abstract interface ISubjectControlContextInformationPresenter
  extends IContextInformationPresenter
{
  public abstract void install(IContextInformation paramIContextInformation, IContentAssistSubjectControl paramIContentAssistSubjectControl, int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ISubjectControlContextInformationPresenter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;

/**
 * @deprecated
 */
public abstract interface ISubjectControlContextInformationValidator
  extends IContextInformationValidator
{
  public abstract void install(IContextInformation paramIContextInformation, IContentAssistSubjectControl paramIContentAssistSubjectControl, int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.ISubjectControlContextInformationValidator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.contentassist.ContentAssistant;

/**
 * @deprecated
 */
public class SubjectControlContentAssistant
  extends ContentAssistant
  implements ISubjectControlContentAssistant
{
  public void install(IContentAssistSubjectControl contentAssistSubjectControl)
  {
    Assert.isNotNull(contentAssistSubjectControl);
    super.install(contentAssistSubjectControl);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.SubjectControlContentAssistant
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;

/**
 * @deprecated
 */
public final class SubjectControlContextInformationValidator
  implements ISubjectControlContextInformationValidator
{
  private IContentAssistProcessor fProcessor;
  private IContextInformation fContextInformation;
  private IContentAssistSubjectControl fContentAssistSubjectControl;
  
  public SubjectControlContextInformationValidator(IContentAssistProcessor processor)
  {
    fProcessor = processor;
  }
  
  public void install(IContextInformation contextInformation, ITextViewer viewer, int offset)
  {
    throw new UnsupportedOperationException();
  }
  
  public void install(IContextInformation contextInformation, IContentAssistSubjectControl contentAssistSubjectControl, int offset)
  {
    fContextInformation = contextInformation;
    fContentAssistSubjectControl = contentAssistSubjectControl;
  }
  
  public boolean isContextInformationValid(int offset)
  {
    if ((fContentAssistSubjectControl != null) && ((fProcessor instanceof ISubjectControlContentAssistProcessor)))
    {
      IContextInformation[] infos = ((ISubjectControlContentAssistProcessor)fProcessor).computeContextInformation(fContentAssistSubjectControl, offset);
      if ((infos != null) && (infos.length > 0)) {
        for (int i = 0; i < infos.length; i++) {
          if (fContextInformation.equals(infos[i])) {
            return true;
          }
        }
      }
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.SubjectControlContextInformationValidator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Text;

class TextContentAssistSubjectAdapter$1
  implements ModifyListener
{
  final TextContentAssistSubjectAdapter.InternalDocument this$1;
  
  TextContentAssistSubjectAdapter$1(TextContentAssistSubjectAdapter.InternalDocument paramInternalDocument)
  {
    this$1 = paramInternalDocument;
  }
  
  public void modifyText(ModifyEvent e)
  {
    this$1.set(TextContentAssistSubjectAdapter.access$0(TextContentAssistSubjectAdapter.InternalDocument.access$1(this$1)).getText());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class TextContentAssistSubjectAdapter$2
  implements Listener
{
  final TextContentAssistSubjectAdapter this$0;
  private final SelectionListener val$selectionListener;
  
  TextContentAssistSubjectAdapter$2(TextContentAssistSubjectAdapter paramTextContentAssistSubjectAdapter, SelectionListener paramSelectionListener)
  {
    this$0 = paramTextContentAssistSubjectAdapter;val$selectionListener = paramSelectionListener;
  }
  
  public void handleEvent(Event e)
  {
    val$selectionListener.widgetSelected(new SelectionEvent(e));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Text;

class TextContentAssistSubjectAdapter$InternalDocument
  extends Document
{
  private ModifyListener fModifyListener;
  final TextContentAssistSubjectAdapter this$0;
  
  TextContentAssistSubjectAdapter$InternalDocument(TextContentAssistSubjectAdapter paramTextContentAssistSubjectAdapter, InternalDocument paramInternalDocument)
  {
    this(paramTextContentAssistSubjectAdapter);
  }
  
  private TextContentAssistSubjectAdapter$InternalDocument(TextContentAssistSubjectAdapter paramTextContentAssistSubjectAdapter)
  {
    super(TextContentAssistSubjectAdapter.access$0(paramTextContentAssistSubjectAdapter).getText());this$0 = paramTextContentAssistSubjectAdapter;
    fModifyListener = new TextContentAssistSubjectAdapter.1(this);
    
    TextContentAssistSubjectAdapter.access$0(paramTextContentAssistSubjectAdapter).addModifyListener(fModifyListener);
  }
  
  public void replace(int pos, int length, String text)
    throws BadLocationException
  {
    super.replace(pos, length, text);
    TextContentAssistSubjectAdapter.access$0(this$0).removeModifyListener(fModifyListener);
    TextContentAssistSubjectAdapter.access$0(this$0).setText(get());
    TextContentAssistSubjectAdapter.access$0(this$0).addModifyListener(fModifyListener);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter.InternalDocument
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.contentassist;

import java.util.HashMap;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;

/**
 * @deprecated
 */
public class TextContentAssistSubjectAdapter
  extends AbstractControlContentAssistSubjectAdapter
{
  private Text fText;
  
  private class InternalDocument
    extends Document
  {
    private ModifyListener fModifyListener;
    
    InternalDocument(InternalDocument paramInternalDocument)
    {
      this();
    }
    
    private InternalDocument()
    {
      super();
      fModifyListener = new TextContentAssistSubjectAdapter.1(this);
      
      fText.addModifyListener(fModifyListener);
    }
    
    public void replace(int pos, int length, String text)
      throws BadLocationException
    {
      super.replace(pos, length, text);
      fText.removeModifyListener(fModifyListener);
      fText.setText(get());
      fText.addModifyListener(fModifyListener);
    }
  }
  
  private HashMap fModifyListeners = new HashMap();
  
  public TextContentAssistSubjectAdapter(Text text)
  {
    Assert.isNotNull(text);
    fText = text;
  }
  
  public Control getControl()
  {
    return fText;
  }
  
  public int getLineHeight()
  {
    return fText.getLineHeight();
  }
  
  public int getCaretOffset()
  {
    return fText.getCaretPosition();
  }
  
  public Point getLocationAtOffset(int offset)
  {
    Point caretLocation = fText.getCaretLocation();
    
    y += 2;
    return caretLocation;
  }
  
  public Point getWidgetSelectionRange()
  {
    return new Point(fText.getSelection().x, Math.abs(fText.getSelection().y - fText.getSelection().x));
  }
  
  public Point getSelectedRange()
  {
    return new Point(fText.getSelection().x, Math.abs(fText.getSelection().y - fText.getSelection().x));
  }
  
  public IDocument getDocument()
  {
    IDocument document = (IDocument)fText.getData("document");
    if (document == null)
    {
      document = new InternalDocument(null);
      fText.setData("document", document);
    }
    return document;
  }
  
  public void setSelectedRange(int i, int j)
  {
    fText.setSelection(new Point(i, i + j));
  }
  
  public void revealRange(int i, int j)
  {
    fText.setSelection(new Point(i, i + j));
  }
  
  public boolean addSelectionListener(SelectionListener selectionListener)
  {
    fText.addSelectionListener(selectionListener);
    Listener listener = new Listener()
    {
      private final SelectionListener val$selectionListener;
      
      public void handleEvent(Event e)
      {
        val$selectionListener.widgetSelected(new SelectionEvent(e));
      }
    };
    fText.addListener(24, listener);
    fModifyListeners.put(selectionListener, listener);
    return true;
  }
  
  public void removeSelectionListener(SelectionListener selectionListener)
  {
    fText.removeSelectionListener(selectionListener);
    Object listener = fModifyListeners.get(selectionListener);
    if ((listener instanceof Listener)) {
      fText.removeListener(24, (Listener)listener);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.internal.text;

import org.eclipse.jface.text.IDelayedInputChangeProvider;
import org.eclipse.jface.text.IInputChangedListener;

public final class DelayedInputChangeListener
  implements IInputChangedListener
{
  private final IDelayedInputChangeProvider fChangeProvider;
  private final InformationControlReplacer fInformationControlReplacer;
  
  public DelayedInputChangeListener(IDelayedInputChangeProvider changeProvider, InformationControlReplacer informationControlReplacer)
  {
    fChangeProvider = changeProvider;
    fInformationControlReplacer = informationControlReplacer;
  }
  
  public void inputChanged(Object newInput)
  {
    fChangeProvider.setDelayedInputChangeListener(null);
    fInformationControlReplacer.setDelayedInput(newInput);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jface.internal.text.DelayedInputChangeListener
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jface.internal.text;

import org.eclipse.jface.text.AbstractReusableInformationControlCreator;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.swt.widgets.Shell;

public class InformationControlReplacer$DefaultInformationControlCreator
  extends AbstractReusableInformationControlCreator
{
  public IInformationControl doCreateInformationControl(Shell shell)
  {
    return new DefaultInformationControl(shell, true);
  }
}

/* Location:
 * Qualified Name:     or
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

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-2017. Infinite Loop Ltd