package com.onpositive.gae.baseviewer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.search.TypeNameRequestor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabFolder2Listener;
import org.eclipse.swt.custom.CTabFolderEvent;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
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.Link;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.ViewPart;
import com.onpositive.commons.contentassist.ContentProposalAdapter;
import com.onpositive.commons.contentassist.IContentProposalListener2;
import com.onpositive.commons.elements.AbstractUIElement;
import com.onpositive.commons.elements.RootElement;
import com.onpositive.commons.elements.SWTEventListener;
import com.onpositive.commons.elements.UniversalUIElement;
import com.onpositive.gae.tools.GaeBridge;
import com.onpositive.gae.tools.UIUtils;
import com.onpositive.gae.tools.core.CheckLaunchJob;
import com.onpositive.gae.tools.license.LicenseChecker;
import com.onpositive.semantic.model.api.command.ICommand;
import com.onpositive.semantic.model.api.command.ICommitListener;
import com.onpositive.semantic.model.api.property.IValueListener;
import com.onpositive.semantic.model.api.property.adapters.ITextLabelProvider;
import com.onpositive.semantic.model.binding.Binding;
import com.onpositive.semantic.model.realm.Realm;
import com.onpositive.semantic.model.ui.property.editors.DisposeBindingListener;
import com.onpositive.semantic.model.ui.property.editors.OneLineTextElement;
import com.onpositive.semantic.model.ui.property.editors.structured.ComboEnumeratedValueSelector;
public class DataViewPart extends ViewPart {
protected IJavaProject project;
private String kind;
protected String projectString;
private Thread kindsUpdater = null;
private class KindsUpdaterThread extends Thread {
public void run() {
try {
IJavaProject p = project;
if (p == null) {
return;
}
BaseDataFacade fff = tableUi.getFacade();
String ns = "";
if (fff != null) {
ns = fff.getNamespace();
}
BaseStatistics query = BaseStatistics.query(p,
new NullProgressMonitor(), creation, ns);
if (p == project && query != null) {
for (String c : query.map.keySet()) {
if (c != null) {
kindsRealm.add(c);
}
}
}
appendKInds(p, ns);
} catch (Exception e) {
// e.printStackTrace();
Activator
.getDefault()
.getLog()
.log(new Status(0, Activator.PLUGIN_ID, "Exception", e));
} finally {
kindsUpdater = null;
}
};
};
private Object lock = new Object();
public void init(IViewSite site, IMemento memento) throws PartInitException {
if (memento != null) {
String string = memento.getString("limit");
if (string != null) {
limit = string;
}
kind = memento.getString("kind");
projectString = memento.getString("project");
}
super.init(site, memento);
}
public void init(IViewSite site) throws PartInitException {
super.init(site);
}
public void saveState(IMemento memento) {
if (memento == null) {
return;
}
memento.putString("limit", limit);
if (project != null) {
memento.putString("project", project.getElementName());
}
if (kindsText != null && kindsText.getText() != null) {
memento.putString("kind", kindsText.getText());
}
super.saveState(memento);
}
protected CTabFolder viewHolder;
protected PageBook pageBook;
private Realm<String> kindsRealm;
protected DataStoreTableUI tableUi = new DataStoreTableUI();
static Image imageDescriptorFromPlugin = Activator
.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
"/icons/element.gif").createImage();
static Image choose = Activator.imageDescriptorFromPlugin(
Activator.PLUGIN_ID, "/icons/appinfo_browse.gif").createImage();
static Image production = Activator.imageDescriptorFromPlugin(
Activator.PLUGIN_ID, "/icons/remote_icon2.png").createImage();// locale.png"
static Image debug = Activator.imageDescriptorFromPlugin(
Activator.PLUGIN_ID, "/icons/local_icon3.png").createImage();// launch_run.gif
private BaseViewerOneLineTextElement<String> kindsText;
protected Action dAction;
protected ToolBarManager toolBarManager;
private Runnable runnable = new Runnable() {
public void run() {
if (project != null) {
kindsRealm.clear();
String[] knownKinds;
try {
knownKinds = AnnotationsStorage.getKnownKinds(project
.getProject());
HashSet<String> element = new HashSet<String>(
Arrays.asList(knownKinds));
element.remove(null);
element.remove("");
kindsRealm.add(element);
} catch (CoreException e) {
Activator.log(e);
}
}
}
};
protected Binding binding;
protected Realm<IProject> projects;
protected IResourceChangeListener resourceListener;
protected Composite status;
protected Label statLabel;
public void dispose() {
AnnotationsStorage.removeListener(runnable);
ResourcesPlugin.getWorkspace().removeResourceChangeListener(
resourceListener);
}
String limit = "100";
boolean creation;
public void createPartControl(Composite parent) {
creation = true;
try {
com.onpositive.gae.tools.license.LicenseChecker.checkLicense(true);
AnnotationsStorage.addListener(runnable);
GridLayout layout2 = new GridLayout(1, false);
layout2.marginHeight = 0;
layout2.marginWidth = 0;
parent.setLayout(layout2);
Composite owner = new Composite(parent, SWT.NONE);
pageBook = new PageBook(parent, SWT.NONE);
final Browser lm = new Browser(pageBook, SWT.NONE);
lm.setText("<h3>No open tabs</h3> <p>To show Data Store entities, please:<br>1) enter the kind into the text field;<br>2) Choose connection configuration between 'manipulate with local server' or 'manipulate with development server';<br>3) click either 'add view', or press 'enter'.</p><i>Hint:</i> push Ctrl-Space in the text field to display the known kinds.");
viewHolder = new CTabFolder(pageBook, SWT.NONE | SWT.CLOSE
| SWT.BORDER);
pageBook.showPage(lm);
owner.setLayoutData(GridDataFactory.fillDefaults()
.grab(true, false).create());
pageBook.setLayoutData(GridDataFactory.fillDefaults()
.grab(true, true).create());
viewHolder.setLayoutData(GridDataFactory.fillDefaults()
.grab(true, true).create());
toolBarManager = new ToolBarManager();
dAction = tableUi.createActions(toolBarManager, true);
Composite mn = new Composite(viewHolder, SWT.NONE);
for (IContributionItem i : toolBarManager.getItems()) {
if (i instanceof ActionContributionItem) {
ActionContributionItem b = (ActionContributionItem) i;
b.getAction().setEnabled(false);
}
}
mn.setLayout(new FillLayout());
ToolBar localToolbar = toolBarManager.createControl(owner);
viewHolder.setTopRight(mn);
viewHolder.layout(true, true);
viewHolder.addCTabFolder2Listener(new CTabFolder2Listener() {
public void showList(CTabFolderEvent event) {
}
public void restore(CTabFolderEvent event) {
}
public void minimize(CTabFolderEvent event) {
}
public void maximize(CTabFolderEvent event) {
}
public void close(CTabFolderEvent event) {
Widget item = event.item;
item.dispose();
if (viewHolder.getItems().length == 0) {
statLabel.setText("");
}
}
});
// viewHolder.setTopRight(owner);
GridLayout layout = new GridLayout(3, false);
layout.marginHeight = 0;
// layout.marginHeight=0;
owner.setLayout(layout);
Link la = new Link(owner, SWT.NONE);
la.setText("Add view of kind:");
RootElement r = new RootElement(owner);
r.setLayoutData(GridDataFactory.fillDefaults().grab(true, false)
.create());
GridLayout layout32 = new GridLayout(7, false);
r.setLayout(layout32);
layout32.marginHeight = 3;
kindsText = new BaseViewerOneLineTextElement<String>();
Binding bnd = new Binding("");
if (kind != null) {
bnd.setValue(kind, null);
} else {
bnd.setValue("", null);
}
// bnd.setName("");
// bnd.setRequired(true);
kindsText.setContentAssistLabelProvider(new LabelProvider() {
public Image getImage(Object element) {
return imageDescriptorFromPlugin;
}
});
kindsText.setBinding(bnd);
kindsRealm = new Realm<String>();
kindsText.addListener(SWT.FocusIn, new SWTEventListener<Text>() {
public void handleEvent(AbstractUIElement<Text> element,
Event event) {
if (!isDebug()) {
addKindsFromStats();
} else {
try {
BaseDataFacade f = tableUi.getFacade();
String ns = "";
if (f != null) {
ns = f.getNamespace();
if (ns == null) {
ns = "";
}
}
appendKInds(project, ns);
} catch (Exception e) {
// e.printStackTrace();
Activator
.getDefault()
.getLog()
.log(new Status(0, Activator.PLUGIN_ID,
"Exception", e));
}
}
}
});
bnd.setRealm(kindsRealm);
kindsText.setContentAssistEnabled(true);
kindsText.setLayoutData(GridDataFactory.fillDefaults()
.grab(true, false).minSize(100, -1).create());
r.add(kindsText);
DisposeBindingListener.linkBindingLifeCycle(bnd, kindsText);
Binding b = new Binding(this);
b.setAutoCommit(true);
OneLineTextElement<String> l = new OneLineTextElement<String>();
l.setCaption("Display not more then:");
Binding binding2 = b.getBinding("limit");
binding2.setRealm(new Realm<String>("All", "10", "100", "500",
"1000", "10000"));
binding2.addCommitListener(new ICommitListener() {
public void commitPerformed(ICommand command) {
CTabItem selection = viewHolder.getSelection();
if (selection != null) {
BaseDataFacade bf = (BaseDataFacade) selection
.getData();
try {
bf.setLimit(Integer.parseInt(limit));
} catch (NumberFormatException e1) {
bf.setLimit(-1);
}
}
}
});
l.setBinding(binding2);
l.setLayoutData(GridDataFactory.fillDefaults().hint(50, -1)
.create());
ComboEnumeratedValueSelector<IProject> v = new ComboEnumeratedValueSelector<IProject>();
DisposeBindingListener.linkBindingLifeCycle(b, l);
binding = new Binding("");
binding.setRequired(true);
binding.setName("Project:");
projects = new Realm<IProject>();
initProjects(projects);
binding.setRealm(projects);
v.setBinding(binding);
if (projectString != null) {
for (IProject p : projects) {
if (p.getName().equals(projectString)) {
setProject(JavaCore.create(p));
}
}
}
DisposeBindingListener.linkBindingLifeCycle(binding, v);
binding.addValueListener(new IValueListener<Object>() {
public void valueChanged(Object oldValue, Object newValue) {
IProject pr = null;
if (newValue instanceof String) {
pr = ResourcesPlugin.getWorkspace().getRoot()
.getProject(newValue.toString());
}
if (newValue instanceof IProject) {
pr = (IProject) newValue;
}
if (pr != null) {
IJavaProject create = JavaCore.create(pr);
if (project == null
|| !create.getElementName().equals(
project.getElementName())) {
setProject(create);
}
} else {
setProject(null);
}
}
});
binding.setAdapter(ITextLabelProvider.class,
new ITextLabelProvider() {
public String getText(Object object) {
if (object == null) {
return "";
}
IProject p = (IProject) object;
return p.getName();
}
public String getDescription(Object object) {
return "";
}
});
r.add(l);
r.add(v);
r.add(new UniversalUIElement<ToolBar>(ToolBar.class, SWT.NONE) {
protected ToolBar createControl(Composite conComposite) {
ToolBarManager tm = new ToolBarManager();
tm.add(new Action("Add view") { // Add view from development
// server
{
/*
* ToolBarManager tm = new ToolBarManager(); boolean
* isLocal =
* Activator.getDefault().getPreferenceStore()
* .getDefaultBoolean("CONNECTION_MODE");
*/
/*
* if(isLocal){
* setText("Add view from local server");
* setToolTipText("Add view from local server");
*/
setImageDescriptor(Activator
.imageDescriptorFromPlugin(
Activator.PLUGIN_ID,
"/icons/exec_view_obj.gif"));
// setT
/*
* }else{
* setText("Add view from production server");
* setToolTipText
* ("Add view from production server");
*
* setImageDescriptor(Activator
* .imageDescriptorFromPlugin( Activator.PLUGIN_ID,
* "/icons/locale.png"));
*
* }
*/
}
public void run() {
boolean isLocal = isDebug();
if (isLocal) {
addView(true);
} else {
addView(false);
}
}
});
/*
* tm.add(new Action("Add view from production server") {
*
* { setImageDescriptor(Activator
* .imageDescriptorFromPlugin( Activator.PLUGIN_ID,
* "/icons/locale.png")); }
*
* public void run() { addView(false); }
*
* });
*/
return tm.createControl(conComposite);
}
});
viewHolder.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
CTabItem selection = viewHolder.getSelection();
BaseDataFacade bf = (BaseDataFacade) selection.getData();
try {
bf.setLimit(Integer.parseInt(limit));
} catch (NumberFormatException e1) {
bf.setLimit(-1);
}
tableUi.setFacade(bf);
String text = bf.getStatus();
statLabel.setText(text);
status.layout(true);
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
status = new Composite(viewHolder, SWT.NONE);
GridLayout layout3 = new GridLayout();
layout3.marginHeight = 2;
status.setLayout(layout3);
statLabel = new Label(status, SWT.RIGHT);
statLabel.setText("Status");
statLabel.setLayoutData(GridDataFactory.fillDefaults()
.align(GridData.END, GridData.CENTER).grab(true, false)
.create());
statLabel.setForeground(Display.getCurrent().getSystemColor(
SWT.COLOR_LIST_SELECTION));
viewHolder.setTopRight(status, SWT.FILL);
viewHolder.addCTabFolder2Listener(new CTabFolder2Listener() {
public void showList(CTabFolderEvent event) {
}
public void restore(CTabFolderEvent event) {
}
public void minimize(CTabFolderEvent event) {
}
public void maximize(CTabFolderEvent event) {
}
public void close(CTabFolderEvent event) {
CTabItem widget = (CTabItem) event.item;
if (widget != null && !widget.isDisposed()) {
Control control = widget.getControl();
if (!control.isDisposed()) {
control.dispose();
}
}
if (viewHolder.getItemCount() < 1) { // == 1 ??
pageBook.showPage(lm);
for (IContributionItem i : toolBarManager.getItems()) {
if (i instanceof ActionContributionItem) {
ActionContributionItem b = (ActionContributionItem) i;
b.getAction().setEnabled(false);
}
}
}
}
});
} finally {
creation = false;
final boolean[] flg = new boolean[1];
flg[0] = false;
kindsText
.addContentProposalistener(new IContentProposalListener2() {
public void proposalPopupOpened(
ContentProposalAdapter contentProposalAdapter) {
flg[0] = true;
}
public void proposalPopupClosed(
ContentProposalAdapter contentProposalAdapter) {
// flg[0] = false;
}
});
kindsText.getControl().addKeyListener(new KeyListener() {
public void keyReleased(KeyEvent e) {
}
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.CR) {
if (!flg[0]) {
boolean isLocal = isDebug();
if (isLocal) {
addView(true);
} else {
addView(false);
}
} else {
flg[0] = false;
}
}
}
});
}
}
protected void initProjects(Realm<IProject> projects2) {
IProject[] projects3 = ResourcesPlugin.getWorkspace().getRoot()
.getProjects();
for (IProject p : projects3) {
try {
if (GaeBridge.getAppId(p) != null) {
projects2.add(p);
}
} catch (Throwable e) {
}
}
resourceListener = new IResourceChangeListener() {
public void resourceChanged(IResourceChangeEvent event) {
if (event.getResource() instanceof IProject) {
IResource resource = event.getResource();
if (event.getType() == IResourceChangeEvent.PRE_DELETE) {
projects.remove((IProject) resource);
} else {
if (GaeBridge.getAppId((IProject) resource) != null) {
projects.add((IProject) resource);
} else {
projects.remove((IProject) resource);
}
}
}
IResourceDelta delta = event.getDelta();
if (delta == null) {
return;
}
try {
delta.accept(new IResourceDeltaVisitor() {
public boolean visit(IResourceDelta delta)
throws CoreException {
if (delta.getResource() instanceof IProject) {
IResource resource = delta.getResource();
if (delta.getKind() == IResourceDelta.REMOVED) {
projects.remove((IProject) resource);
} else {
if (GaeBridge.getAppId((IProject) resource) != null) {
projects.add((IProject) resource);
} else {
projects.remove((IProject) resource);
}
}
}
if (delta.getResource() instanceof IWorkspaceRoot) {
return true;
}
return false;
}
});
} catch (CoreException e) {
Activator.log(e);
}
}
};
ResourcesPlugin.getWorkspace().addResourceChangeListener(
resourceListener);
}
public void setFocus() {
}
public void setProject(final IJavaProject project) {
this.project = project;
kindsRealm.clear();
if (project != null) {
String[] knownKinds;
try {
knownKinds = AnnotationsStorage.getKnownKinds(project
.getProject());
HashSet<String> element = new HashSet<String>(
Arrays.asList(knownKinds));
element.remove(null);
element.remove("");
kindsRealm.add(element);
if (knownKinds.length == 0) {
Job j = new Job("Updating kinds list") {
protected IStatus run(IProgressMonitor monitor) {
ProjectMiner pMiner = new ProjectMiner("", project);
String[] updatedKinds = pMiner
.findAllPossibleKindsForProject();
HashSet<String> element = new HashSet<String>(
Arrays.asList(updatedKinds));
element.remove(null);
element.remove("");
kindsRealm.add(element);
return Status.OK_STATUS;
}
};
j.schedule();
}
} catch (CoreException e) {
Activator.log(e);
}
binding.setValue(project.getProject(), null);
}
addKindsFromStats();
}
protected void addView(boolean debug) {
if (!LicenseChecker.checkLicense(debug)) {
return;
}
if (project == null) {
IJavaProject javaGaeProject = UIUtils.getJavaGaeProject();
if (javaGaeProject != null) {
setProject(javaGaeProject);
} else {
return;
}
}
String appId = GaeBridge.getAppId(project.getProject());
if (appId == null || appId.trim().length() == 0) {
if (!debug) {
MessageDialog.openError(
Display.getCurrent().getActiveShell(),
"Application id is not specified",
"Application id is not specified for "
+ project.getElementName()
+ ".\n\nSpecify application id and try again");
return;
}
}
String name = "empty";
if (kindsText != null) {
name = kindsText.getText().trim();
}
if (name.trim().length() == 0) {
MessageDialog.openError(Display.getCurrent().getActiveShell(),
"Kind should not be empty.", "Kind should not be empty.");
return;
}
try {
AnnotationsStorage.addKnownKind(project.getProject(), name);
} catch (CoreException e) {
Activator.log(e);
}
if (debug) {
CheckLaunchJob d = LocalServerLauncher.launchLocalServer(project);
if (d.getPort() == -1) {
return;
}
}
final CTabItem cTabItem = new CTabItem(viewHolder, SWT.CLOSE);
StringBuilder title = new StringBuilder();
title.append(name);
title.append(" (" + project.getElementName());
title.append(")");
cTabItem.setText(title.toString());
cTabItem.setShowClose(true);
Composite owner = new Composite(viewHolder, SWT.NONE);
owner.setLayout(new FillLayout());
for (IContributionItem i : toolBarManager.getItems()) {
if (i instanceof ActionContributionItem) {
ActionContributionItem b = (ActionContributionItem) i;
b.getAction().setEnabled(true);
}
}
BaseViewer bd = new BaseViewer(dAction, tableUi, project.getProject(),
name);
bd.createControl(owner);
final BaseDataFacade facade = new BaseDataFacade(name, project, this,
debug, bd.getRefreshCallback(), bd.getSingleCallback());
try {
int parseInt = Integer.parseInt(limit);
facade.setLimit(parseInt);
} catch (NumberFormatException e) {
}
facade.setStatusCallback(new IStatusCallback() {
public void statusChanged(final String newStatus) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
if (viewHolder.getSelection() == cTabItem) {
statLabel.setText(newStatus);
status.layout(true, true);
}
}
});
}
});
bd.setDataFacade(facade);
cTabItem.setData(facade);
cTabItem.setControl(owner);
cTabItem.setImage(debug ? DataViewPart.debug : production);
final String nnm = name;
facade.addChangeNamespaceListener(new IChangeNamespaceListener() {
public void handleChanging(String namespace) {
StringBuilder title = new StringBuilder();
title.append(nnm);
title.append(" (" + project.getElementName());
String nsp = tableUi.facade.namespace;
if (nsp != null && nsp.length() != 0) {
title.append(":" + nsp);
}
title.append(")");
cTabItem.setText(title.toString());
}
});
viewHolder.setSelection(cTabItem);
tableUi.setFacade(facade);
pageBook.showPage(viewHolder);
}
public void setAppId(String appId) {
}
private void addKindsFromStats() {
if (isDebug()) {
/*
* BaseDataFacade fff = tableUi.getFacade(); String ns = ""; if (fff
* != null) { ns = fff.getNamespace(); } try { appendKInds(project,
* ns); } catch (Exception e) { // e.printStackTrace(); Activator
* .getDefault() .getLog() .log(new Status(0, Activator.PLUGIN_ID,
* "Exception", e)); }
*/
return;
}
if (kindsUpdater == null) {
kindsUpdater = new KindsUpdaterThread();
kindsUpdater.setDaemon(true);
kindsUpdater.start();
}
}
protected boolean isDebug() {
IPreferenceStore ps = Activator.getDefault().getPreferenceStore();
boolean flg = ps.contains("CONNECTION_MODE");
boolean isLocal = Activator.getDefault().getPreferenceStore()
.getBoolean("CONNECTION_MODE");
return isLocal;
}
private void appendKInds(IJavaProject p, String ns) throws Exception {
List<String> klist = BaseStatistics.queryGoogleStatistic("__kind__", p,
new NullProgressMonitor(), ns, isDebug());
if (klist != null) {
for (String s : klist) {
kindsRealm.add(s);
}
}
}
private class TypesRequestor extends TypeNameRequestor {
private ArrayList<String> simple = new ArrayList();
private ArrayList<String> fullName = new ArrayList();
public void acceptType(int modifiers, char[] packageName,
char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
super.acceptType(modifiers, packageName, simpleTypeName,
enclosingTypeNames, path);
simple.add(new String(simpleTypeName));
fullName.add(new String(packageName) + "."
+ new String(simpleTypeName));
}
public String[] getSimpleNamesList() {
return simple.toArray(new String[simple.size()]);
}
public String[] getListOfFullNames() {
return fullName.toArray(new String[fullName.size()]);
}
}
}