+++ /dev/null
-/*
-* Inhouse
-*
-* Copyright (c) 2000 - 2011 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>
-* Hoon Kang <h245.kang@samsung.com>
-* DongHee Yang <donghee.yang@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
-*
-*/
-package org.tizen.nativeplatform.pkgInstall;
-
-
-public class PackageAction {
-
-}
-/*
-public class PackageAction implements IExtensionPointAction {
-
- private ImageDescriptor imgDescriptor;
- private String actionText;
-
- public PackageAction() {
- imgDescriptor = Activator.getImageDescriptor("/icons/package_installer.gif");
- actionText = "Package Manager";
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- return imgDescriptor;
- }
-
- @Override
- public void createDialog( Shell shell, String target ) {
- boolean enableRootstrap = true;
- IProject project = CurrentEnabledProject.getCurrentProject();
- if (project == null) {
- enableRootstrap = false;
- } else {
- IConfiguration cfg =ManagedBuildManager.getBuildInfo( project ).getDefaultConfiguration();
- IManagedProject managedProject = cfg.getManagedProject();
- String projectTypeName = managedProject.getName();
- if (!projectTypeName.equals(SLPInhouseConfigurationManager.CUSTOM_DEBIAN_PROJECT_TYPE) &&
- !projectTypeName.equals(SLPInhouseConfigurationManager.CUSTOM_DEBIAN_PROJECT_TYPE_OLD)) {
- enableRootstrap = false;
- }
- }
- PackageManager pkgdlg = new PackageManager(shell, target, enableRootstrap, true);
-
- pkgdlg.open();
- }
-
- @Override
- public String getActionText() {
- return actionText;
- }
-}
-*/
\ No newline at end of file
ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
try {
- dialog.run(true, false, new IRunnableWithProgress() {
+ dialog.run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
- monitor.beginTask("apt-get update", -1);
+ monitor.beginTask("apt-get update", -1);
+
+ CheckCancelJob cancelJob = new CheckCancelJob(monitor);
+ Thread checkCancelThread = new Thread(cancelJob);
+ checkCancelThread.start();
ConsoleManager cm = new ConsoleManager( "Package Installer", true);
cm.clear();
e.printStackTrace();
}
+ checkCancelThread.interrupt();
//monitor.worked(1);
monitor.done();
}