diff options
author | Doug Schaefer | 2015-08-31 19:32:43 +0000 |
---|---|---|
committer | Doug Schaefer | 2015-08-31 19:32:43 +0000 |
commit | 6e6156e42f0fa8c04aa71519878788f65e82bb43 (patch) | |
tree | 30d324669148f9829b0cab4aa58aa80be4c981ce /qt | |
parent | 64c57825896980a473ebc362f5a32d806c2c85e4 (diff) | |
download | org.eclipse.cdt-6e6156e42f0fa8c04aa71519878788f65e82bb43.tar.gz org.eclipse.cdt-6e6156e42f0fa8c04aa71519878788f65e82bb43.tar.xz org.eclipse.cdt-6e6156e42f0fa8c04aa71519878788f65e82bb43.zip |
Add missing copyright notices.
Diffstat (limited to 'qt')
4 files changed, 70 insertions, 0 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java new file mode 100644 index 00000000000..8b79e1c3729 --- /dev/null +++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.cdt.internal.qt.core.build; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.cdt.core.build.CBuildConfiguration; +import org.eclipse.core.resources.IBuildConfiguration; +import org.eclipse.core.runtime.IAdapterFactory; + +public class QtBuildConfiguration extends CBuildConfiguration { + + public QtBuildConfiguration(IBuildConfiguration config) { + super(config); + } + + private static Map<IBuildConfiguration, QtBuildConfiguration> cache = new HashMap<>(); + + public static class Factory implements IAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { + if (adapterType.equals(QtBuildConfiguration.class) && adaptableObject instanceof IBuildConfiguration) { + synchronized (cache) { + IBuildConfiguration config = (IBuildConfiguration) adaptableObject; + QtBuildConfiguration qtConfig = cache.get(config); + if (qtConfig == null) { + qtConfig = new QtBuildConfiguration(config); + cache.put(config, qtConfig); + } + return (T) qtConfig; + } + } + return null; + } + + @Override + public Class<?>[] getAdapterList() { + return new Class<?>[] { QtBuildConfiguration.class }; + } + } + +} diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuilder.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuilder.java index 06ef2941907..6050c620264 100644 --- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuilder.java +++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuilder.java @@ -1,3 +1,10 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package org.eclipse.cdt.internal.qt.core.build; import java.io.File; diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/project/QtProjectGenerator.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/project/QtProjectGenerator.java index 36f71b83a76..810b1e493c2 100644 --- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/project/QtProjectGenerator.java +++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/project/QtProjectGenerator.java @@ -1,3 +1,10 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package org.eclipse.cdt.internal.qt.core.project; import java.util.HashMap; diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/NewQtProjectWizard.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/NewQtProjectWizard.java index 414be826efe..0f153537bf0 100644 --- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/NewQtProjectWizard.java +++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/NewQtProjectWizard.java @@ -1,3 +1,10 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ package org.eclipse.cdt.internal.qt.ui; import org.eclipse.cdt.internal.qt.core.project.QtProjectGenerator; |