1 package com.proalpha.pds.ui;
3 import org.eclipse.core.expressions.PropertyTester;
4 import org.eclipse.core.resources.IFile;
5 import org.eclipse.core.runtime.Platform;
6 import org.eclipse.jface.text.TextSelection;
7 import org.eclipse.jface.viewers.IStructuredSelection;
8 import org.eclipse.jface.viewers.TreeSelection;
10 import com.proalpha.pds.paconnector.Activator;
11 import com.proalpha.pds.paconnector.PaProject;
16 public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
20 if (receiver instanceof TextSelection || receiver instanceof TreeSelection) {
24 if (paProject ==
null)
27 if (!paProject.isAvailable())
35 if (
"canCreateUserExit".equalsIgnoreCase(property)) {
38 if (paProject.getCustomLevel().isEmpty()
46 else if (
"canUpdateUserExit".equalsIgnoreCase(property)) {
50 if (paProject.getCustomLevel().isEmpty()
56 if (file.getFileExtension().equals(
"cls"))
static Activator getDefault()
PaProject getPaProjectByTextSelection()