org.eclipse.jface.viewers,
org.osgi.framework"
Bundle-Vendor: %Bundle-Vendor
-Import-Package: org.eclipse.debug.core,
+Import-Package: org.eclipse.core.expressions,
+ org.eclipse.debug.core,
org.eclipse.debug.core.model,
org.eclipse.debug.ui,
org.tizen.common.gom.launch,
value="1">
</count>
<iterate>
+ <test
+ property="org.tizen.web.simulator.isTizenMobileProject"
+ forcePluginActivation="true">
+ </test>
+
<and>
<test
property="org.eclipse.core.resources.projectNature"
</adapter>
</factory>
</extension>
-
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.tizen.web.simulator.TizenPropertyTester"
+ id="org.tizen.web.simulator.TizenPropertyTester"
+ namespace="org.tizen.web.simulator"
+ properties="isTizenMobileProject"
+ type="org.eclipse.core.resources.IResource">
+ </propertyTester>
+ </extension>
+
</plugin>
--- /dev/null
+/*
+ * Web Simulator
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Taejun Ha <taejun.ha@samsung.com>
+ * Jiil Hyoun <jiil.hyoun@samsung.com>
+ * Donghyuk Yang <donghyuk.yang@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * DongHee Yang <donghee.yang@samsung.com>
+ * NamKi Lee <namki.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung Electronics Co.., Ltd
+ *
+ */
+
+package org.tizen.web.simulator;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.TizenProjectDescription;
+
+public class TizenPropertyTester extends PropertyTester {
+ private final Logger logger = LoggerFactory.getLogger(TizenPropertyTester.class);
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ try {
+ if (property.equals("isTizenMobileProject")) {
+ if (receiver instanceof IProject) {
+ IProject project = (IProject) receiver;
+ if (org.tizen.common.util.ProjectUtil.getTizenProjectDescription(project).getProfileName().equals("mobile")){
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+ return false;
+ } catch (Exception e) {
+ logger.error("Failed to test isTizenProject", e);
+ // It must return a value although an error occurs.
+ // Otherwise, UI like project popup is broken.
+ return false;
+ }
+ }
+}