issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.javadocexport; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URL; import java.text.MessageFormat; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceDescription; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.DebugPlugin;
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
import org.eclipse.debug.core.IDebugEventSetListener; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.Launch; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.swt.widgets.Display; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IExportWizard; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IWorkbench; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; import org.eclipse.jdt.launching.JavaRuntime; import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaPluginImages; import org.eclipse.jdt.internal.ui.actions.OpenExternalJavadocAction; import org.eclipse.jdt.internal.ui.jarpackager.ConfirmSaveModifiedResourcesDialog; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; public class JavadocWizard extends Wizard implements IExportWizard {
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
private JavadocTreeWizardPage fJTWPage; private JavadocSpecificsWizardPage fJSWPage; private IPath fDestination; private IJavaProject fCurrentProject; private boolean fWriteCustom; private boolean fFromAnt; private boolean fOpenInBrowser; protected final String TreePageDesc= "JavadocTreePage"; protected final String SpecificsPageDesc= "JavadocSpecificsPage"; private JavadocOptionsManager fStore; private IWorkspaceRoot fRoot; private IFile fXmlJavadocFile; public JavadocWizard() { this(null); } public JavadocWizard(IFile xmlJavadocFile) { super();
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_REFACTOR); setWindowTitle(JavadocExportMessages.getString("JavadocWizard.javadocwizard.title")); setDialogSettings(JavaPlugin.getDefault().getDialogSettings()); fRoot= ResourcesPlugin.getWorkspace().getRoot(); fXmlJavadocFile= xmlJavadocFile; fCurrentProject= null; fWriteCustom= false; fFromAnt= (xmlJavadocFile != null); } /* * @see IWizard#performFinish() */ public boolean performFinish() { fJTWPage.finish(); fJSWPage.finish(); if (!checkPreconditions(fJTWPage.getResources())) { return false; } fDestination= new Path(fStore.getDestination()); fDestination.toFile().mkdirs(); if (fJSWPage.openInBrowser()) { this.fOpenInBrowser= true; } try { URL currURL= JavaDocLocations.getProjectJavadocLocation(fStore.getJavaProject());
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
URL newURL= fDestination.toFile().toURL(); if (fStore.fromStandard() && ((currURL == null) || !(currURL.equals(newURL)))) { String message= JavadocExportMessages.getString("JavadocWizard.updatejavadoclocation.message"); if (MessageDialog.openQuestion(getShell(), JavadocExportMessages.getString("JavadocWizard.updatejavadocdialog.label"), MessageFormat.format(message, new String[] { fStore.getJavaProject().getElementName(), fStore.getDestination() }))) { JavaDocLocations.setProjectJavadocLocation(fStore.getJavaProject(), newURL); } } } catch (MalformedURLException e) { JavaPlugin.log(e); } if (fJSWPage.generateAnt()) { fStore.createXML(); refresh(new Path(fStore.getAntpath())); } if (!fFromAnt) { getDialogSettings().addSection(fStore.createDialogSettings()); } String[] args= fStore.createArgumentArray(); if (!executeJavadocGeneration(args)) return false; return true; } private boolean executeJavadocGeneration(String[] args) { Process process= null; try { process= Runtime.getRuntime().exec(args); if (process != null) {
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
StringBuffer buf= new StringBuffer(); for (int i= 0; i < args.length; i++) { buf.append(args[i]); buf.append(' '); } IDebugEventSetListener listener= new JavadocDebugEventListener(); DebugPlugin.getDefault().addDebugEventListener(listener); ILaunchConfigurationWorkingCopy wc= null; try { ILaunchConfigurationType lcType= DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION); String name= "Javadoc Export Wizard"; wc= lcType.newInstance(null, name); wc.setAttribute(IDebugUIConstants.ATTR_TARGET_RUN_PERSPECTIVE, (String) null); wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true); ILaunch newLaunch= new Launch(wc, ILaunchManager.RUN_MODE, null); IProcess iprocess= DebugPlugin.newProcess(newLaunch, process, JavadocExportMessages.getString("JavadocWizard.javadocprocess.label")); iprocess.setAttribute(JavaRuntime.ATTR_CMDLINE, buf.toString()); DebugPlugin.getDefault().getLaunchManager().addLaunch(newLaunch); } catch (CoreException e) { JavaPlugin.logErrorMessage(e.getMessage()); } return true; } } catch (IOException e) { JavaPlugin.log(e); return false;
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
} return false; } private boolean checkPreconditions(List resources) { IFile[] unSavedFiles = getUnsavedFiles(resources); return saveModifiedResourcesIfUserConfirms(unSavedFiles); } /** * Returns the files which are not saved and which are * part of the files being exported. * * @return an array of unsaved files */ private IFile[] getUnsavedFiles(List resources) { IEditorPart[] dirtyEditors = JavaPlugin.getDirtyEditors(); Set unsavedFiles = new HashSet(dirtyEditors.length); if (dirtyEditors.length > 0) { for (int i = 0; i < dirtyEditors.length; i++) { if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile = ((IFileEditorInput) dirtyEditors[i].getEditorInput()).getFile(); if (resources.contains(dirtyFile)) { unsavedFiles.add(dirtyFile); } } } }
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
return (IFile[]) unsavedFiles.toArray(new IFile[unsavedFiles.size()]); } /** * Asks to confirm to save the modified resources * and save them if OK is pressed. Must be run in the display thread. * * @return true if user pressed OK and save was successful. */ private boolean saveModifiedResourcesIfUserConfirms(IFile[] dirtyFiles) { if (confirmSaveModifiedResources(dirtyFiles)) { try { if (saveModifiedResources(dirtyFiles)) return true; } catch(CoreException e) { ExceptionHandler.handle(e, getShell(), JavadocExportMessages.getString("JavadocWizard.saveresourcedialogCE.title"), JavadocExportMessages.getString("JavadocWizard.saveresourcedialogCE.message")); } catch(InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), JavadocExportMessages.getString("JavadocWizard.saveresourcedialogITE.title"), JavadocExportMessages.getString("JavadocWizard.saveresourcedialogITE.message")); } } return false; } /** * Asks the user to confirm to save the modified resources. * * @return true if user pressed OK. */ private boolean confirmSaveModifiedResources(IFile[] dirtyFiles) { if (dirtyFiles == null || dirtyFiles.length == 0) return true;
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
Display display= getShell().getDisplay(); if (display == null || display.isDisposed()) return false; final ConfirmSaveModifiedResourcesDialog dlg= new ConfirmSaveModifiedResourcesDialog(getShell(), dirtyFiles); final int[] intResult= new int[1]; Runnable runnable= new Runnable() { public void run() { intResult[0]= dlg.open(); } }; display.syncExec(runnable); return intResult[0] == IDialogConstants.OK_ID; } /** * Save all of the editors in the workbench. Must be run in the display thread. * * @return true if successful. */ private boolean saveModifiedResources(final IFile[] dirtyFiles) throws CoreException, InvocationTargetException { IWorkspace workspace= ResourcesPlugin.getWorkspace(); IWorkspaceDescription description= workspace.getDescription(); boolean autoBuild= description.isAutoBuilding(); description.setAutoBuilding(false); try { workspace.setDescription(description); try { new ProgressMonitorDialog(getShell()).run(false, false, createSaveModifiedResourcesRunnable(dirtyFiles));
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
} finally { description.setAutoBuilding(autoBuild); workspace.setDescription(description); } } catch (InterruptedException ex) { return false; } return true; } private IRunnableWithProgress createSaveModifiedResourcesRunnable(final IFile[] dirtyFiles) { return new IRunnableWithProgress() { public void run(final IProgressMonitor pm) { IEditorPart[] editorsToSave= JavaPlugin.getDirtyEditors(); pm.beginTask("Saving modified resources", editorsToSave.length); try { List dirtyFilesList= Arrays.asList(dirtyFiles); for (int i= 0; i < editorsToSave.length; i++) { if (editorsToSave[i].getEditorInput() instanceof IFileEditorInput) { IFile dirtyFile= ((IFileEditorInput)editorsToSave[i].getEditorInput()).getFile(); if (dirtyFilesList.contains((dirtyFile))) editorsToSave[i].doSave(new SubProgressMonitor(pm, 1)); } pm.worked(1); } } finally { pm.done(); } } }; }
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
/* * @see IWizard#addPages() */ public void addPages() { fJTWPage= new JavadocTreeWizardPage(TreePageDesc, fStore); fJSWPage= new JavadocSpecificsWizardPage(SpecificsPageDesc, fStore, fJTWPage); super.addPage(fJTWPage); super.addPage(fJSWPage); fJTWPage.init(); fJSWPage.init(); } public void init(IWorkbench workbench, IStructuredSelection structuredSelection) { IDialogSettings settings= getDialogSettings(); if (fXmlJavadocFile == null) { fStore= new JavadocOptionsManager(settings.getSection("javadoc"), fRoot, structuredSelection); } else { fStore= new JavadocOptionsManager(fXmlJavadocFile, settings, fRoot, structuredSelection); } } private void refresh(IPath path) { if (fRoot.getContainerForLocation(path) != null) { try { fRoot.refreshLocal(fJTWPage.fRoot.DEPTH_INFINITE, null); } catch (CoreException e) { JavaPlugin.log(e); } } }
13,161
Bug 13161 Javadoc wizard: Message on Export wizard page not conforming to others
Build 20020409 All other export operations tell the user what the wizard does. Javadoc wizard says that it's a wizard ("Javadoc Generation Wizard"). It should tell the user what it is going to do.
resolved fixed
a23dfd9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T11:54:34Z
2002-04-10T09:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
private void spawnInBrowser() { if (fOpenInBrowser) { try { IPath indexFile= fDestination.append("index.html"); URL url= indexFile.toFile().toURL(); OpenExternalJavadocAction.openInBrowser(url, getShell()); } catch (MalformedURLException e) { JavaPlugin.log(e); } } } private class JavadocDebugEventListener implements IDebugEventSetListener { public void handleDebugEvents(DebugEvent[] events) { for (int i= 0; i < events.length; i++) { if (events[i].getKind() == DebugEvent.TERMINATE) { try { if (!fWriteCustom) { refresh(fDestination); spawnInBrowser(); } } finally { DebugPlugin.getDefault().removeDebugEventListener(this); } return; } } } } }
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectPackageDeclarationProposal.java
/******************************************************************************* * Copyright (c) 2000, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.ui.text.correction; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IPackageDeclaration; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; import org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange; import org.eclipse.jdt.internal.corext.textmanipulation.SimpleTextEdit; import org.eclipse.jdt.internal.ui.JavaPlugin; public class CorrectPackageDeclarationProposal extends CUCorrectionProposal {
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectPackageDeclarationProposal.java
private ProblemPosition fProblemPosition; public CorrectPackageDeclarationProposal(ProblemPosition problemPos, int relevance) throws CoreException { super(CorrectionMessages.getString("CorrectPackageDeclarationProposal.name"), problemPos.getCompilationUnit(), relevance); fProblemPosition= problemPos; } /* * @see CUCorrectionProposal#addEdits(CompilationUnitChange) */ protected void addEdits(CompilationUnitChange change) throws CoreException { ICompilationUnit cu= change.getCompilationUnit(); IPackageFragment parentPack= (IPackageFragment) cu.getParent(); IPackageDeclaration[] decls= cu.getPackageDeclarations(); if (parentPack.isDefaultPackage() && decls.length > 0) { for (int i= 0; i < decls.length; i++) { ISourceRange range= decls[i].getSourceRange(); change.addTextEdit(CorrectionMessages.getString("CorrectPackageDeclarationProposal.removeedit.label"), SimpleTextEdit.createDelete(range.getOffset(), range.getLength())); } return; } if (!parentPack.isDefaultPackage() && decls.length == 0) { String lineDelim= StubUtility.getLineDelimiterUsed(cu);
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectPackageDeclarationProposal.java
String str= "package " + parentPack.getElementName() + ";" + lineDelim + lineDelim; change.addTextEdit(CorrectionMessages.getString("CorrectPackageDeclarationProposal.addedit.label"), SimpleTextEdit.createInsert(0, str)); return; } ProblemPosition pos= fProblemPosition; change.addTextEdit(CorrectionMessages.getString("CorrectPackageDeclarationProposal.changenameedit.label"), SimpleTextEdit.createReplace(pos.getOffset(), pos.getLength(), parentPack.getElementName())); } /* * @see ICompletionProposal#getDisplayString() */ public String getDisplayString() { ICompilationUnit cu= fProblemPosition.getCompilationUnit(); IPackageFragment parentPack= (IPackageFragment) cu.getParent(); try { IPackageDeclaration[] decls= cu.getPackageDeclarations(); if (parentPack.isDefaultPackage() && decls.length > 0) { return CorrectionMessages.getString("CorrectPackageDeclarationProposal.remove.description") + decls[0].getElementName() + ";'"; } if (!parentPack.isDefaultPackage() && decls.length == 0) { return (CorrectionMessages.getString("CorrectPackageDeclarationProposal.add.description") + parentPack.getElementName() + "'"); } } catch(JavaModelException e) { JavaPlugin.log(e); } return (CorrectionMessages.getString("CorrectPackageDeclarationProposal.change.description") + parentPack.getElementName() + "'"); } }
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
/******************************************************************************* * Copyright (c) 2000, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.ui.text.correction; import java.text.Collator; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.Position; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.contentassist.IContextInformationValidator; import org.eclipse.jface.text.source.Annotation; import org.eclipse.jface.text.source.IAnnotationModel; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.texteditor.IDocumentProvider;
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.javaeditor.IProblemAnnotation; import org.eclipse.jdt.internal.ui.javaeditor.ProblemAnnotationIterator; public class JavaCorrectionProcessor implements IContentAssistProcessor { public static boolean hasCorrections(int problemId) { switch (problemId) { case IProblem.UnterminatedString: case IProblem.UnterminatedComment: case IProblem.UndefinedMethod: case IProblem.UndefinedField: case IProblem.UndefinedName: case IProblem.PublicClassMustMatchFileName: case IProblem.PackageIsNotExpectedPackage: case IProblem.UndefinedType: case IProblem.FieldTypeNotFound: case IProblem.ArgumentTypeNotFound: case IProblem.ReturnTypeNotFound: case IProblem.SuperclassNotFound: case IProblem.ExceptionTypeNotFound: case IProblem.InterfaceNotFound: case IProblem.TypeMismatch: return true; default: return false; } } private static class CorrectionsComparator implements Comparator {
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
private static Collator fgCollator= Collator.getInstance(); public int compare(Object o1, Object o2) { ChangeCorrectionProposal e1= (ChangeCorrectionProposal) o1; ChangeCorrectionProposal e2= (ChangeCorrectionProposal) o2; int del= e2.getRelevance() - e1.getRelevance(); if (del != 0) { return del; } return fgCollator.compare(e1.getDisplayString(), e2.getDisplayString()); } } private IEditorPart fEditor; /** * Constructor for JavaCorrectionProcessor. */
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
public JavaCorrectionProcessor(IEditorPart editor) { fEditor= editor; } /* * @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int) */ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); ICompilationUnit cu= manager.getWorkingCopy(fEditor.getEditorInput()); IDocumentProvider provider= JavaPlugin.getDefault().getCompilationUnitDocumentProvider(); IAnnotationModel model= provider.getAnnotationModel(fEditor.getEditorInput()); ArrayList proposals= new ArrayList(); HashSet idsProcessed= new HashSet(); for (Iterator iter= new ProblemAnnotationIterator(model); iter.hasNext();) { IProblemAnnotation annot= (IProblemAnnotation) iter.next(); Position pos= model.getPosition((Annotation) annot); ProblemPosition pp = new ProblemPosition(pos, annot, cu); int start= pp.getOffset(); if (documentOffset >= start && documentOffset <= (start + pp.getLength())) { Integer probId= new Integer(annot.getId()); if (!idsProcessed.contains(probId)) { idsProcessed.add(probId); collectCorrections(pp, proposals); } } }
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
if (proposals.isEmpty()) { return null; } ICompletionProposal[] res= (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]); Arrays.sort(res, new CorrectionsComparator()); return res; } private void collectCorrections(ProblemPosition problemPos, ArrayList proposals) { try { int id= problemPos.getId(); switch (id) { case IProblem.UnterminatedString: int pos= InsertCorrectionProposal.moveBack(problemPos.getOffset() + problemPos.getLength(), problemPos.getOffset(), "\n\r", problemPos.getCompilationUnit()); proposals.add(new InsertCorrectionProposal(problemPos, CorrectionMessages.getString("JavaCorrectionProcessor.addquote.description"), pos, "\"", 0)); break; case IProblem.UnterminatedComment: proposals.add(new InsertCorrectionProposal(problemPos, CorrectionMessages.getString("JavaCorrectionProcessor.addcomment.description"), problemPos.getOffset() + problemPos.getLength(), "*/", 0)); break; case IProblem.UndefinedMethod: UnresolvedElementsSubProcessor.getMethodProposals(problemPos, proposals); break; case IProblem.UndefinedField: case IProblem.UndefinedName: UnresolvedElementsSubProcessor.getVariableProposals(problemPos, proposals); break; case IProblem.PublicClassMustMatchFileName: ReorgCorrectionsSubProcessor.getWrongTypeNameProposals(problemPos, proposals); break; case IProblem.PackageIsNotExpectedPackage:
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
ReorgCorrectionsSubProcessor.getWrongPackageDeclNameProposals(problemPos, proposals); break; case IProblem.UndefinedType: case IProblem.FieldTypeNotFound: case IProblem.ArgumentTypeNotFound: case IProblem.ReturnTypeNotFound: UnresolvedElementsSubProcessor.getTypeProposals(problemPos, SimilarElementsRequestor.TYPES, proposals); break; case IProblem.SuperclassNotFound: case IProblem.ExceptionTypeNotFound: UnresolvedElementsSubProcessor.getTypeProposals(problemPos, SimilarElementsRequestor.CLASSES, proposals); break; case IProblem.InterfaceNotFound: UnresolvedElementsSubProcessor.getTypeProposals(problemPos, SimilarElementsRequestor.INTERFACES, proposals); break; case IProblem.TypeMismatch: ReorgCorrectionsSubProcessor.addCastProposal(problemPos, proposals); break; default: } } catch (CoreException e) { JavaPlugin.log(e); } } /* * @see IContentAssistProcessor#computeContextInformation(ITextViewer, int) */ public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
return null; } /* * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters() */ public char[] getCompletionProposalAutoActivationCharacters() { return null; } /* * @see IContentAssistProcessor#getContextInformationAutoActivationCharacters() */ public char[] getContextInformationAutoActivationCharacters() { return null; } /* * @see IContentAssistProcessor#getContextInformationValidator() */ public IContextInformationValidator getContextInformationValidator() { return null; } /* * @see IContentAssistProcessor#getErrorMessage() */ public String getErrorMessage() { return null; } }
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NoCorrectionProposal.java
/******************************************************************************* * Copyright (c) 2000, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.ui.text.correction; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.internal.corext.refactoring.NullChange; public class NoCorrectionProposal extends ChangeCorrectionProposal {
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NoCorrectionProposal.java
private ProblemPosition fProblemPosition; public NoCorrectionProposal(ProblemPosition problemPosition) { super("No correction available", new NullChange(), 0); fProblemPosition= problemPosition; } /* * @see ICompletionProposal#getAdditionalProposalInfo() */ public String getAdditionalProposalInfo() { StringBuffer buf= new StringBuffer(); buf.append("<p><b>"); buf.append(getErrorCode(fProblemPosition.getId())); buf.append("</b></p>"); buf.append("<p>"); buf.append(fProblemPosition.getMessage()); buf.append("</p>"); String[] arg= fProblemPosition.getArguments(); if (arg != null) { for (int i= 0; i < arg.length; i++) { buf.append("<p>"); buf.append(arg[i]); buf.append("</p>"); } } return buf.toString(); }
13,226
Bug 13226 Quick Fix: unclear why nothing gets proposed
Build 20020409 - create CU public class QuickFixTest { public static class TT { } public void foo(TTT t) { } } - try to quick fix foo(TTT t) All you get is the bell. This is surprising since foo(String2 s) can be fixed.
resolved fixed
dabb5f0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T15:26:23Z
2002-04-10T12:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NoCorrectionProposal.java
private String getErrorCode(int code) { StringBuffer buf= new StringBuffer(); if ((code & IProblem.TypeRelated) != 0) { buf.append("TypeRelated + "); } if ((code & IProblem.FieldRelated) != 0) { buf.append("FieldRelated + "); } if ((code & IProblem.ConstructorRelated) != 0) { buf.append("ConstructorRelated + "); } if ((code & IProblem.MethodRelated) != 0) { buf.append("MethodRelated + "); } if ((code & IProblem.ImportRelated) != 0) { buf.append("ImportRelated + "); } if ((code & IProblem.Internal) != 0) { buf.append("Internal + "); } if ((code & IProblem.Syntax) != 0) { buf.append("Syntax + "); } buf.append(code & IProblem.IgnoreCategoriesMask); return buf.toString(); } }
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
/* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.jarpackager; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Text; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.ui.dialogs.SaveAsDialog; import org.eclipse.ui.dialogs.SelectionDialog; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.jarpackager.JarPackageData; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.packageview.EmptyInnerPackageFilter; import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.util.MainMethodSearchEngine; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.internal.ui.viewsupport.LibraryFilter; /** * Page 3 of the JAR Package wizard */ class JarManifestWizardPage extends WizardPage implements IJarPackageWizardPage { private class UntypedListener implements Listener { /* * Implements method from Listener */ public void handleEvent(Event e) { if (getControl() == null) return; update(); } } private UntypedListener fUntypedListener= new UntypedListener(); private JarPackageData fJarPackage; private IType[] fMainTypes;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
private Composite fManifestGroup; private Button fGenerateManifestRadioButton; private Button fSaveManifestCheckbox; private Button fReuseManifestCheckbox; private Text fNewManifestFileText; private Label fNewManifestFileLabel; private Button fNewManifestFileBrowseButton; private Button fUseManifestRadioButton; private Text fManifestFileText; private Label fManifestFileLabel; private Button fManifestFileBrowseButton; private Label fSealingHeaderLabel; private Button fSealJarRadioButton; private Label fSealJarLabel; private Button fSealedPackagesDetailsButton; private Button fSealPackagesRadioButton; private Label fSealPackagesLabel; private Button fUnSealedPackagesDetailsButton; private Label fMainClassHeaderLabel; private Label fMainClassLabel; private Text fMainClassText; private Button fMainClassBrowseButton; private final static String PAGE_NAME= "JarManifestWizardPage";
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
private final static String STORE_GENERATE_MANIFEST= PAGE_NAME + ".GENERATE_MANIFEST"; private final static String STORE_SAVE_MANIFEST= PAGE_NAME + ".SAVE_MANIFEST"; private final static String STORE_REUSE_MANIFEST= PAGE_NAME + ".REUSE_MANIFEST"; private final static String STORE_MANIFEST_LOCATION= PAGE_NAME + ".MANIFEST_LOCATION"; private final static String STORE_SEAL_JAR= PAGE_NAME + ".SEAL_JAR"; /** * Create an instance of this class */ public JarManifestWizardPage(JarPackageData jarPackage) { super(PAGE_NAME); setTitle(JarPackagerMessages.getString("JarManifestWizardPage.title")); setDescription(JarPackagerMessages.getString("JarManifestWizardPage.description")); fJarPackage= jarPackage; } /* * Method declared on IDialogPage. */ public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.manifestSource.label"), false);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
createManifestGroup(composite); createSpacer(composite); fSealingHeaderLabel= createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.sealingHeader.label"), false); createSealingGroup(composite); createSpacer(composite); fMainClassHeaderLabel= createLabel(composite, JarPackagerMessages.getString("JarManifestWizardPage.mainClassHeader.label"), false); createMainClassGroup(composite); setEqualButtonSizes(); restoreWidgetValues(); setControl(composite); update(); WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.JARMANIFEST_WIZARD_PAGE); } /** * Create the export options specification widgets. * * @param parent org.eclipse.swt.widgets.Composite */ protected void createManifestGroup(Composite parent) { fManifestGroup= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); fManifestGroup.setLayout(layout); fManifestGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); fGenerateManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT); fGenerateManifestRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.genetateManifest.text")); fGenerateManifestRadioButton.addListener(SWT.Selection, fUntypedListener); Composite saveOptions= new Composite(fManifestGroup, SWT.NONE); GridLayout saveOptionsLayout= new GridLayout();
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
saveOptionsLayout.marginWidth= 0; saveOptions.setLayout(saveOptionsLayout); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.horizontalIndent=20; saveOptions.setLayoutData(data); fSaveManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT); fSaveManifestCheckbox.setText(JarPackagerMessages.getString("JarManifestWizardPage.saveManifest.text")); fSaveManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener); fReuseManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT); fReuseManifestCheckbox.setText(JarPackagerMessages.getString("JarManifestWizardPage.reuseManifest.text")); fReuseManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener); createNewManifestFileGroup(saveOptions); fUseManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT); fUseManifestRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.useManifest.text")); fUseManifestRadioButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite existingManifestGroup= new Composite(fManifestGroup, SWT.NONE); GridLayout existingManifestLayout= new GridLayout(); existingManifestLayout.marginWidth= 0; existingManifestGroup.setLayout(existingManifestLayout); data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.horizontalIndent=20; existingManifestGroup.setLayoutData(data); createManifestFileGroup(existingManifestGroup); } protected void createNewManifestFileGroup(Composite parent) {
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
Composite manifestFileGroup= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginWidth= 0; layout.numColumns= 3; manifestFileGroup.setLayout(layout); manifestFileGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); fNewManifestFileLabel= new Label(manifestFileGroup, SWT.NONE); fNewManifestFileLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.newManifestFile.text")); fNewManifestFileText= new Text(manifestFileGroup, SWT.SINGLE | SWT.BORDER); fNewManifestFileText.addListener(SWT.Modify, fUntypedListener); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.widthHint= convertWidthInCharsToPixels(40); fNewManifestFileText.setLayoutData(data); fNewManifestFileBrowseButton= new Button(manifestFileGroup, SWT.PUSH); fNewManifestFileBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.newManifestFileBrowseButton.text")); fNewManifestFileBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); fNewManifestFileBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleNewManifestFileBrowseButtonPressed(); } }); } protected void createManifestFileGroup(Composite parent) { Composite manifestFileGroup= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 3;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
layout.marginWidth= 0; manifestFileGroup.setLayout(layout); manifestFileGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); fManifestFileLabel= new Label(manifestFileGroup, SWT.NONE); fManifestFileLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.manifestFile.text")); fManifestFileText= new Text(manifestFileGroup, SWT.SINGLE | SWT.BORDER); fManifestFileText.addListener(SWT.Modify, fUntypedListener); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.widthHint= convertWidthInCharsToPixels(40); fManifestFileText.setLayoutData(data); fManifestFileBrowseButton= new Button(manifestFileGroup, SWT.PUSH); fManifestFileBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.manifestFileBrowse.text")); fManifestFileBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); fManifestFileBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleManifestFileBrowseButtonPressed(); } }); } /** * Creates the JAR sealing specification controls. * * @param parent the parent control */ protected void createSealingGroup(Composite parent) { Composite sealingGroup= new Composite(parent, SWT.NONE);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
GridLayout layout= new GridLayout(); layout.numColumns= 3; layout.horizontalSpacing += 3; sealingGroup.setLayout(layout); sealingGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); createSealJarGroup(sealingGroup); createSealPackagesGroup(sealingGroup); } /** * Creates the JAR sealing specification controls to seal the whole JAR. * * @param parent the parent control */ protected void createSealJarGroup(Composite sealGroup) { fSealJarRadioButton= new Button(sealGroup, SWT.RADIO); fSealJarRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealJar.text")); fSealJarRadioButton.addListener(SWT.Selection, fUntypedListener); fSealJarLabel= new Label(sealGroup, SWT.RIGHT); fSealJarLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); fSealJarLabel.setText(""); fUnSealedPackagesDetailsButton= new Button(sealGroup, SWT.PUSH); fUnSealedPackagesDetailsButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); fUnSealedPackagesDetailsButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.unsealPackagesButton.text")); fUnSealedPackagesDetailsButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleUnSealPackagesDetailsButtonPressed(); } });
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
} /** * Creates the JAR sealing specification controls to seal packages. * * @param parent the parent control */ protected void createSealPackagesGroup(Composite sealGroup) { fSealPackagesRadioButton= new Button(sealGroup, SWT.RADIO); fSealPackagesRadioButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealPackagesButton.text")); fSealPackagesLabel= new Label(sealGroup, SWT.RIGHT); fSealPackagesLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); fSealPackagesLabel.setText(""); fSealedPackagesDetailsButton= new Button(sealGroup, SWT.PUSH); fSealedPackagesDetailsButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); fSealedPackagesDetailsButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesDetailsButton.text")); fSealedPackagesDetailsButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleSealPackagesDetailsButtonPressed(); } }); } protected void createMainClassGroup(Composite parent) { Composite mainClassGroup= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 3; mainClassGroup.setLayout(layout); mainClassGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); fMainClassLabel= new Label(mainClassGroup, SWT.NONE);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
fMainClassLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.mainClass.label")); fMainClassText= new Text(mainClassGroup, SWT.SINGLE | SWT.BORDER); fMainClassText.addListener(SWT.Modify, fUntypedListener); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.widthHint= convertWidthInCharsToPixels(40); fMainClassText.setLayoutData(data); fMainClassText.addKeyListener(new KeyAdapter() { /* * @see KeyListener#keyReleased(KeyEvent) */ public void keyReleased(KeyEvent e) { fJarPackage.setManifestMainClass(findMainMethodByName(fMainClassText.getText())); update(); } }); fMainClassBrowseButton= new Button(mainClassGroup, SWT.PUSH); fMainClassBrowseButton.setText(JarPackagerMessages.getString("JarManifestWizardPage.mainClassBrowseButton.text")); fMainClassBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); fMainClassBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleMainClassBrowseButtonPressed(); } }); } private void update() {
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
updateModel(); updateEnableState(); updatePageCompletion(); } /** * Open an appropriate dialog so that the user can specify a manifest * to save */ protected void handleNewManifestFileBrowseButtonPressed() { SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell()); dialog.create(); dialog.getShell().setText(JarPackagerMessages.getString("JarManifestWizardPage.saveAsDialog.title")); dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.saveAsDialog.message")); dialog.setOriginalFile(createFileHandle(fJarPackage.getManifestLocation())); if (dialog.open() == dialog.OK) { fJarPackage.setManifestLocation(dialog.getResult()); fNewManifestFileText.setText(dialog.getResult().toString()); } } protected void handleManifestFileBrowseButtonPressed() { ElementTreeSelectionDialog dialog= createWorkspaceFileSelectionDialog(JarPackagerMessages.getString("JarManifestWizardPage.manifestSelectionDialog.title"), JarPackagerMessages.getString("JarManifestWizardPage.manifestSelectionDialog.message")); if (fJarPackage.isManifestAccessible()) dialog.setInitialSelections(new IResource[] {fJarPackage.getManifestFile()}); if (dialog.open() == dialog.OK) { Object[] resources= dialog.getResult(); if (resources.length != 1) setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.onlyOneManifestMustBeSelected")); else {
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
setErrorMessage(""); fJarPackage.setManifestLocation(((IResource)resources[0]).getFullPath()); fManifestFileText.setText(fJarPackage.getManifestLocation().toString()); } } } private IType findMainMethodByName(String name) { if (fMainTypes == null) { List resources= JarPackagerUtil.asResources(fJarPackage.getElements()); if (resources == null) setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.noResourceSelected")); IJavaSearchScope searchScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope((IResource[])resources.toArray(new IResource[resources.size()])); MainMethodSearchEngine engine= new MainMethodSearchEngine(); try { fMainTypes= engine.searchMainMethods(getContainer(), searchScope, 0); } catch (InvocationTargetException ex) { } catch (InterruptedException e) { } } for (int i= 0; i < fMainTypes.length; i++) { if (fMainTypes[i].getFullyQualifiedName().equals(name)) return fMainTypes[i]; } return null; } protected void handleMainClassBrowseButtonPressed() { List resources= JarPackagerUtil.asResources(fJarPackage.getElements()); if (resources == null) {
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.noResourceSelected")); return; } IJavaSearchScope searchScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope((IResource[])resources.toArray(new IResource[resources.size()])); SelectionDialog dialog= JavaUI.createMainTypeDialog(getContainer().getShell(), getContainer(), searchScope, 0, false, ""); dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.mainTypeSelectionDialog.title")); dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.mainTypeSelectionDialog.message")); if (fJarPackage.getManifestMainClass() != null) dialog.setInitialSelections(new Object[] {fJarPackage.getManifestMainClass()}); if (dialog.open() == dialog.OK) { fJarPackage.setManifestMainClass((IType)dialog.getResult()[0]); fMainClassText.setText(JarPackagerUtil.getMainClassName(fJarPackage)); } else if (!fJarPackage.isMainClassValid(getContainer())) { fJarPackage.setManifestMainClass(null); fMainClassText.setText(JarPackagerUtil.getMainClassName(fJarPackage)); } } protected void handleSealPackagesDetailsButtonPressed() { SelectionDialog dialog= createPackageDialog(getPackagesForSelectedResources(fJarPackage)); dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesSelectionDialog.title")); dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.sealedPackagesSelectionDialog.message")); dialog.setInitialSelections(fJarPackage.getPackagesToSeal()); if (dialog.open() == dialog.OK) fJarPackage.setPackagesToSeal(getPackagesFromDialog(dialog)); updateSealingInfo(); } protected void handleUnSealPackagesDetailsButtonPressed() { SelectionDialog dialog= createPackageDialog(getPackagesForSelectedResources(fJarPackage)); dialog.setTitle(JarPackagerMessages.getString("JarManifestWizardPage.unsealedPackagesSelectionDialog.title"));
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
dialog.setMessage(JarPackagerMessages.getString("JarManifestWizardPage.unsealedPackagesSelectionDialog.message")); dialog.setInitialSelections(fJarPackage.getPackagesToUnseal()); if (dialog.open() == dialog.OK) fJarPackage.setPackagesToUnseal(getPackagesFromDialog(dialog)); updateSealingInfo(); } /** * Updates the enable state of this page's controls. Subclasses may extend. */ protected void updateEnableState() { boolean generate= fGenerateManifestRadioButton.getSelection(); boolean save= generate && fSaveManifestCheckbox.getSelection(); fSaveManifestCheckbox.setEnabled(generate); fReuseManifestCheckbox.setEnabled(fJarPackage.isDescriptionSaved() && save); fNewManifestFileText.setEnabled(save); fNewManifestFileLabel.setEnabled(save); fNewManifestFileBrowseButton.setEnabled(save); fManifestFileText.setEnabled(!generate); fManifestFileLabel.setEnabled(!generate); fManifestFileBrowseButton.setEnabled(!generate); fSealingHeaderLabel.setEnabled(generate); boolean sealState= fSealJarRadioButton.getSelection(); fSealJarRadioButton.setEnabled(generate); fSealJarLabel.setEnabled(generate); fUnSealedPackagesDetailsButton.setEnabled(sealState && generate); fSealPackagesRadioButton.setEnabled(generate); fSealPackagesLabel.setEnabled(generate); fSealedPackagesDetailsButton.setEnabled(!sealState && generate); fMainClassHeaderLabel.setEnabled(generate); fMainClassLabel.setEnabled(generate);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
fMainClassText.setEnabled(generate); fMainClassBrowseButton.setEnabled(generate); updateSealingInfo(); } protected void updateSealingInfo() { if (fJarPackage.isJarSealed()) { fSealPackagesLabel.setText(""); int i= fJarPackage.getPackagesToUnseal().length; if (i == 0) fSealJarLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.jarSealed")); else if (i == 1) fSealJarLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.jarSealedExceptOne")); else fSealJarLabel.setText(JarPackagerMessages.getFormattedString("JarManifestWizardPage.jarSealedExceptSome", new Integer(i))); } else { fSealJarLabel.setText(""); int i= fJarPackage.getPackagesToSeal().length; if (i == 0) fSealPackagesLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.nothingSealed")); else if (i == 1) fSealPackagesLabel.setText(JarPackagerMessages.getString("JarManifestWizardPage.onePackageSealed")); else fSealPackagesLabel.setText(JarPackagerMessages.getFormattedString("JarManifestWizardPage.somePackagesSealed", new Integer(i))); } } /* * Implements method from IJarPackageWizardPage
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
*/ public boolean isPageComplete() { boolean incompleteButNotAnError= false; if (fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) { if (fJarPackage.getManifestLocation().toString().length() == 0) incompleteButNotAnError= true; else { IPath location= fJarPackage.getManifestLocation(); if (!location.toString().startsWith("/")) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestPathMustBeAbsolute")); return false; } IResource resource= findResource(location); if (resource != null && resource.getType() != IResource.FILE) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestMustNotBeExistingContainer")); return false; } resource= findResource(location.removeLastSegments(1)); if (resource == null || resource.getType() == IResource.FILE) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.manifestContainerDoesNotExist")); return false; } } } if (!fJarPackage.isManifestGenerated() && !fJarPackage.isManifestAccessible()) { if (fJarPackage.getManifestLocation().toString().length() == 0) setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.noManifestFile")); else setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.invalidManifestFile")); return false;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
} Set selectedPackages= getPackagesForSelectedResources(fJarPackage); if (fJarPackage.isJarSealed() && !selectedPackages.containsAll(Arrays.asList(fJarPackage.getPackagesToUnseal()))) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.unsealedPackagesNotInSelection")); return false; } if (!fJarPackage.isJarSealed() && !selectedPackages.containsAll(Arrays.asList(fJarPackage.getPackagesToSeal()))) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.sealedPackagesNotInSelection")); return false; } if (!fJarPackage.isMainClassValid(getContainer()) || (fJarPackage.getManifestMainClass() == null && fMainClassText.getText().length() > 0)) { setErrorMessage(JarPackagerMessages.getString("JarManifestWizardPage.error.invalidMainClass")); return false; } if (incompleteButNotAnError) { setErrorMessage(null); return false; } setErrorMessage(null); return true; } /* * Implements method from IWizardPage. */ public void setPreviousPage(IWizardPage page) { super.setPreviousPage(page); fMainTypes= null;
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
updateEnableState(); if (getContainer() != null) updatePageCompletion(); } /* * Implements method from IJarPackageWizardPage. */ public void finish() { saveWidgetValues(); } /** * Persists resource specification control setting that are to be restored * in the next instance of this page. Subclasses wishing to persist * settings for their controls should extend the hook method * <code>internalSaveWidgetValues</code>. */ public final void saveWidgetValues() { IDialogSettings settings= getDialogSettings(); if (settings != null) { settings.put(STORE_GENERATE_MANIFEST, fJarPackage.isManifestGenerated()); settings.put(STORE_SAVE_MANIFEST, fJarPackage.isManifestSaved()); settings.put(STORE_REUSE_MANIFEST, fJarPackage.isManifestReused()); settings.put(STORE_MANIFEST_LOCATION, fJarPackage.getManifestLocation().toString()); settings.put(STORE_SEAL_JAR, fJarPackage.isJarSealed()); } internalSaveWidgetValues();
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
} /** * Hook method for subclasses to persist their settings. */ protected void internalSaveWidgetValues() { } /** * Hook method for restoring widget values to the values that they held * last time this wizard was used to completion. */ protected void restoreWidgetValues() { if (!((JarPackageWizard)getWizard()).isInitializingFromJarPackage()) initializeJarPackage(); if (fJarPackage.isManifestGenerated()) fGenerateManifestRadioButton.setSelection(true); else fUseManifestRadioButton.setSelection(true); fSaveManifestCheckbox.setSelection(fJarPackage.isManifestSaved()); fReuseManifestCheckbox.setSelection(fJarPackage.isManifestReused()); fManifestFileText.setText(fJarPackage.getManifestLocation().toString()); fNewManifestFileText.setText(fJarPackage.getManifestLocation().toString()); if (fJarPackage.isJarSealed()) fSealJarRadioButton.setSelection(true); else fSealPackagesRadioButton.setSelection(true); fMainClassText.setText(JarPackagerUtil.getMainClassName(fJarPackage));
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
} /** * Initializes the JAR package from last used wizard page values. */ protected void initializeJarPackage() { IDialogSettings settings= getDialogSettings(); if (settings != null) { fJarPackage.setGenerateManifest(settings.getBoolean(STORE_GENERATE_MANIFEST)); fJarPackage.setSaveManifest(settings.getBoolean(STORE_SAVE_MANIFEST)); fJarPackage.setReuseManifest(settings.getBoolean(STORE_REUSE_MANIFEST)); String pathStr= settings.get(STORE_MANIFEST_LOCATION); if (pathStr == null) pathStr= ""; fJarPackage.setManifestLocation(new Path(pathStr)); fJarPackage.setSealJar(settings.getBoolean(STORE_SEAL_JAR)); } } /** * Stores the widget values in the JAR package. */ protected void updateModel() { if (getControl() == null) return; fJarPackage.setGenerateManifest(fGenerateManifestRadioButton.getSelection()); fJarPackage.setSaveManifest(fSaveManifestCheckbox.getSelection()); fJarPackage.setReuseManifest(fReuseManifestCheckbox.getSelection());
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
String path; if (fJarPackage.isManifestGenerated()) path= fNewManifestFileText.getText(); else path= fManifestFileText.getText(); if (path == null) path= ""; fJarPackage.setManifestLocation(new Path(path)); fJarPackage.setSealJar(fSealJarRadioButton.getSelection()); } /** * Determine if the page is complete and update the page appropriately. */ protected void updatePageCompletion() { boolean pageComplete= isPageComplete(); setPageComplete(pageComplete); if (pageComplete) { setErrorMessage(null); } } /** * Creates a file resource handle for the file with the given workspace path. * This method does not create the file resource; this is the responsibility * of <code>createFile</code>. * * @param filePath the path of the file resource to create a handle for * @return the new file resource handle * @see #createFile
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
*/ protected IFile createFileHandle(IPath filePath) { if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(filePath); else return null; } /** * Creates a new label with a bold font. * * @param parent the parent control * @param text the label text * @return the new label control */ protected Label createLabel(Composite parent, String text, boolean bold) { Label label= new Label(parent, SWT.NONE); if (bold) label.setFont(JFaceResources.getBannerFont()); label.setText(text); GridData data= new GridData(); data.verticalAlignment= GridData.FILL; data.horizontalAlignment= GridData.FILL; label.setLayoutData(data); return label; } /** * Sets the size of a control. * * @param control the control for which to set the size * @param width the new width of the control
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
* @param height the new height of the control */ protected void setSize(Control control, int width, int height) { GridData gd= new GridData(GridData.END); gd.widthHint= width ; gd.heightHint= height; control.setLayoutData(gd); } /** * Makes the size of all buttons equal. */ protected void setEqualButtonSizes() { int width= SWTUtil.getButtonWidthHint(fManifestFileBrowseButton); int height= SWTUtil.getButtonHeigthHint(fManifestFileBrowseButton); int width2= SWTUtil.getButtonWidthHint(fNewManifestFileBrowseButton); int height2= SWTUtil.getButtonHeigthHint(fNewManifestFileBrowseButton); width= Math.max(width, width2); height= Math.max(height, height2); width2= SWTUtil.getButtonWidthHint(fSealedPackagesDetailsButton); height2= SWTUtil.getButtonHeigthHint(fSealedPackagesDetailsButton); width= Math.max(width, width2); height= Math.max(height, height2); width2= SWTUtil.getButtonWidthHint(fUnSealedPackagesDetailsButton); height2= SWTUtil.getButtonHeigthHint(fUnSealedPackagesDetailsButton); width= Math.max(width, width2); height= Math.max(height, height2); width2= SWTUtil.getButtonWidthHint(fMainClassBrowseButton); height2= SWTUtil.getButtonHeigthHint(fMainClassBrowseButton); width= Math.max(width, width2); height= Math.max(height, height2);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
setSize(fManifestFileBrowseButton, width, height); setSize(fNewManifestFileBrowseButton, width, height); setSize(fSealedPackagesDetailsButton, width, height); setSize(fUnSealedPackagesDetailsButton, width, height); setSize(fMainClassBrowseButton, width, height); } /** * Creates a horizontal spacer line that fills the width of its container. * * @param parent the parent control */ protected void createSpacer(Composite parent) { Label spacer= new Label(parent, SWT.NONE); GridData data= new GridData(); data.horizontalAlignment= GridData.FILL; data.verticalAlignment= GridData.BEGINNING; spacer.setLayoutData(data); } /** * Returns the resource for the specified path. * * @param path the path for which the resource should be returned * @return the resource specified by the path or <code>null</code> */ protected IResource findResource(IPath path) { IWorkspace workspace= JavaPlugin.getWorkspace(); IStatus result= workspace.validatePath( path.toString(), IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
if (result.isOK() && workspace.getRoot().exists(path)) return workspace.getRoot().findMember(path); return null; } protected IPath getPathFromString(String text) { return new Path(text).makeAbsolute(); } /** * Creates a selection dialog that lists all packages under the given package * fragment root. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected packages (of type * <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>. * * @param packageFragments the package fragments * @return a new selection dialog */ protected SelectionDialog createPackageDialog(Set packageFragments) { List packages= new ArrayList(packageFragments.size()); for (Iterator iter= packageFragments.iterator(); iter.hasNext();) { IPackageFragment fragment= (IPackageFragment)iter.next(); boolean containsJavaElements= false; int kind; try { kind= fragment.getKind(); containsJavaElements= fragment.getChildren().length > 0; } catch (JavaModelException ex) { ExceptionHandler.handle(ex, getContainer().getShell(), JarPackagerMessages.getString("JarManifestWizardPage.error.jarPackageWizardError.title"), JarPackagerMessages.getFormattedString("JarManifestWizardPage.error.jarPackageWizardError.message", fragment.getElementName())); continue; }
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
if (kind != IPackageFragmentRoot.K_BINARY && containsJavaElements) packages.add(fragment); } JavaElementContentProvider cp= new JavaElementContentProvider() { public boolean hasChildren(Object element) { return !(element instanceof IPackageFragment) && super.hasChildren(element); } }; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getContainer().getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT), cp); dialog.setDoubleClickSelects(false); dialog.setInput(JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot())); dialog.addFilter(new EmptyInnerPackageFilter()); dialog.addFilter(new LibraryFilter()); dialog.addFilter(new SealPackagesFilter(packages)); dialog.setValidator(new ISelectionValidator() { public IStatus validate(Object[] selection) { StatusInfo res= new StatusInfo(); for (int i= 0; i < selection.length; i++) { if (!(selection[i] instanceof IPackageFragment)) { res.setError(JarPackagerMessages.getString("JarManifestWizardPage.error.mustContainPackages")); return res; } } res.setOK(); return res; } }); return dialog; }
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
/** * Converts selection dialog results into an array of IPackageFragments. * An empty array is returned in case of errors. * @throws ClassCastException if results are not IPackageFragments */ protected IPackageFragment[] getPackagesFromDialog(SelectionDialog dialog) { if (dialog.getReturnCode() == dialog.OK && dialog.getResult().length > 0) return (IPackageFragment[])Arrays.asList(dialog.getResult()).toArray(new IPackageFragment[dialog.getResult().length]); else return new IPackageFragment[0]; } /** * Creates and returns a dialog to choose an existing workspace file. */ protected ElementTreeSelectionDialog createWorkspaceFileSelectionDialog(String title, String message) { int labelFlags= JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS | JavaElementLabelProvider.SHOW_SMALL_ICONS; ITreeContentProvider contentProvider= new JavaElementContentProvider(); ILabelProvider labelProvider= new JavaElementLabelProvider(labelFlags); ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider); dialog.setAllowMultiple(false); dialog.setValidator(new ISelectionValidator() { public IStatus validate(Object[] selection) { StatusInfo res= new StatusInfo(); if (selection.length == 1 && (selection[0] instanceof IFile)) res.setOK(); else res.setError("");
13,066
Bug 13066 Mainfest File Corrupt
Hello! I have been trying to export my code, specifying a manifest, into a jar file. However, my manifest file is not placed in the jar. A blank manifest file is inserted instead. I go to File->Export->Jar file I select my project, mark "export generated class files and resources", specify the jar name and check the "compress jar" option. <Next> I check "Save a description of this jar file in the workspace" <Next> I mark, "Use existing manifest from the workspace" and specify the location of my manifest file. <Finish> I couldn't attach my manifest file, but here is it's contents. . . Main-Class: com.sbc.cb.Application Class-Path: . cbhelp.jar jaxb-rt-1.0-ea.jar jhall.jar lumberjack.jar pvjfc60.jar
resolved fixed
49c27fb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-11T18:40:15Z
2002-04-09T13:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java
return res; } }); dialog.addFilter(new EmptyInnerPackageFilter()); dialog.addFilter(new LibraryFilter()); dialog.setTitle(title); dialog.setMessage(message); dialog.setStatusLineAboveButtons(true); dialog.setInput(JavaCore.create(JavaPlugin.getDefault().getWorkspace().getRoot())); return dialog; } /** * Returns the minimal set of packages which contain all the selected Java resources. * @return the Set of IPackageFragments which contain all the selected resources */ private Set getPackagesForSelectedResources(JarPackageData jarPackage) { Set packages= new HashSet(); int n= fJarPackage.getElements().length; for (int i= 0; i < n; i++) { Object element= fJarPackage.getElements()[i]; if (element instanceof ICompilationUnit) { IJavaElement pack= JavaModelUtil.findParentOfKind((IJavaElement)element, org.eclipse.jdt.core.IJavaElement.PACKAGE_FRAGMENT); if (pack != null) packages.add(pack); } } return packages; } }
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
/******************************************************************************* * Copyright (c) 2000, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.ui.actions; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.LabelProvider;
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.corext.refactoring.base.Refactoring; import org.eclipse.jdt.internal.corext.refactoring.nls.NLSElement; import org.eclipse.jdt.internal.corext.refactoring.nls.NLSLine; import org.eclipse.jdt.internal.corext.refactoring.nls.NLSScanner; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.ActionMessages; import org.eclipse.jdt.internal.ui.refactoring.actions.ListDialog; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.viewsupport.ListContentProvider; import org.eclipse.jdt.ui.JavaElementLabelProvider; /** * Find all Strings in a package or project that aren't externalized yet. * * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> * * @since 2.0 */ public class FindStringsToExternalizeAction extends SelectionDispatchAction {
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
private static final String FIND_STRINGS_CHECKBOX= "FindStringAction.checkbox"; /** * Creates a new <code>FindStringsToExternalizeAction</code>. * * @param site the site providing context information for this action
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
*/ public FindStringsToExternalizeAction(UnifiedSite site) { super(site); setText(ActionMessages.getString("FindStringsToExternalizeAction.label")); } /* (non-Javadoc) * Method declared on SelectionDispatchAction. */ protected void selectionChanged(IStructuredSelection selection) { setEnabled(computeEnablementState(selection)); } private boolean computeEnablementState(IStructuredSelection selection) { if (selection.size() == 0) return false; for (Iterator iter= selection.iterator(); iter.hasNext();) { Object element= (Object)iter.next(); if (!(element instanceof IJavaElement)) return false; int elementType= ((IJavaElement)element).getElementType(); if (elementType != IJavaElement.PACKAGE_FRAGMENT && elementType != IJavaElement.PACKAGE_FRAGMENT_ROOT && elementType != IJavaElement.JAVA_PROJECT) return false; } return true; } /* (non-Javadoc)
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
* Method declared on SelectionDispatchAction. */ protected void run(final IStructuredSelection selection) { new BusyIndicator().showWhile(getShell().getDisplay(), new Runnable() { public void run() { doRun(selection); } }); } private void doRun(IStructuredSelection selection) { List elements= getSelectedElementList(selection); if (elements == null || elements.isEmpty()) return; try{ List l= new ArrayList(); for (Iterator iter= elements.iterator(); iter.hasNext();) { IJavaElement element= (IJavaElement) iter.next(); if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) l.addAll(analyze((IPackageFragment) element)); else if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT) l.addAll(analyze((IPackageFragmentRoot) element)); if (element.getElementType() == IJavaElement.JAVA_PROJECT) l.addAll(analyze((IJavaProject) element)); } showResults(l); } catch(JavaModelException e) { ExceptionHandler.handle(e, ActionMessages.getString("FindStringsToExternalizeAction.dialog.title"), ActionMessages.getString("FindStringsToExternalizeAction.error.message"));
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
} } private void showResults(List l) { if (noStrings(l)) MessageDialog.openInformation(getShell(), ActionMessages.getString("FindStringsToExternalizeAction.dialog.title"), ActionMessages.getString("FindStringsToExternalizeAction.noStrings")); else new NonNLSListDialog(getShell(), l, countStrings(l)).open(); } private boolean noStrings(List l) { for (Iterator iter= l.iterator(); iter.hasNext();) { NonNLSElement element= (NonNLSElement)iter.next(); if (element.count != 0) return false; } return true; } /* * returns List of Strings */ private List analyze(IPackageFragment pack) throws JavaModelException{ if (pack == null) return new ArrayList(0); ICompilationUnit[] cus= pack.getCompilationUnits();
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
List l= new ArrayList(cus.length); for (int i= 0; i < cus.length; i++) l.add(analyze(cus[i])); return l; } /* * returns List of Strings */ private List analyze(IPackageFragmentRoot sourceFolder) throws JavaModelException{ IJavaElement[] children= sourceFolder.getChildren(); List result= new ArrayList(); for (int i= 0; i < children.length; i++) { IJavaElement iJavaElement= children[i]; if (iJavaElement.getElementType() == IJavaElement.PACKAGE_FRAGMENT){ IPackageFragment pack= (IPackageFragment)iJavaElement; if (! pack.isReadOnly()) result.addAll(analyze(pack)); } } return result; } /* * returns List of Strings */ private List analyze(IJavaProject project) throws JavaModelException{ IPackageFragment[] packs= project.getPackageFragments(); List result= new ArrayList(); for (int i= 0; i < packs.length; i++) { if (! packs[i].isReadOnly())
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
result.addAll(analyze(packs[i])); } return result; } /* * @param List of NonNLSElements */ private static int countStrings(List elements){ int i= 0; for (Iterator iter= elements.iterator(); iter.hasNext(); ) i += (((NonNLSElement)iter.next()).count); return i; } private NonNLSElement analyze(ICompilationUnit cu) throws JavaModelException{ return new NonNLSElement(cu, countNotExternalizedStrings(cu)); } private int countNotExternalizedStrings(ICompilationUnit cu){ try{ NLSLine[] lines= NLSScanner.scan(cu); int result= 0; for (int i= 0; i < lines.length; i++) { result += countNotExternalizedStrings(lines[i]); } return result; }catch(JavaModelException e) { ExceptionHandler.handle(e, ActionMessages.getString("FindStringsToExternalizeAction.dialog.title"),
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
ActionMessages.getString("FindStringsToExternalizeAction.error.message")); return 0; }catch(InvalidInputException iie) { JavaPlugin.log(iie); return 0; } } private int countNotExternalizedStrings(NLSLine line){ int result= 0; NLSElement[] elements= line.getElements(); for (int i= 0; i < elements.length; i++){ if (! elements[i].hasTag()) result++; } return result; } /** * returns <code>List</code> of <code>IPackageFragments</code>, <code>IPackageFragmentRoots</code> or * <code>IJavaProjects</code> (all entries are of the same kind) */ private static List getSelectedElementList(IStructuredSelection selection) { if (selection == null) return null; return selection.toList(); } private static LabelProvider createLabelProvider() { return new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT){ public String getText(Object element) {
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
NonNLSElement nlsel= (NonNLSElement)element; String elementName= nlsel.cu.getElementName(); try{ elementName= Refactoring.getResource(nlsel.cu).getProjectRelativePath().toString(); }catch (JavaModelException e){ } return ActionMessages.getFormattedString( "FindStringsToExternalizeAction.foundStrings", new Object[] {new Integer(nlsel.count), elementName} ); } public Image getImage(Object element) { return super.getImage(((NonNLSElement)element).cu); } }; } private static boolean loadCheckboxState(boolean defaultValue){ String res= JavaPlugin.getDefault().getDialogSettings().get(FIND_STRINGS_CHECKBOX); if (res == null) return defaultValue; return Boolean.valueOf(res).booleanValue(); } private static void storeCheckboxState(boolean selected){ JavaPlugin.getDefault().getDialogSettings().put(FIND_STRINGS_CHECKBOX, selected); } private static class NonNLSListDialog extends ListDialog {
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
private static final int OPEN_BUTTON_ID= IDialogConstants.CLIENT_ID + 1; private Button fCheckbox; private Button fOpenButton; NonNLSListDialog(Shell parent, Object input, int count) { super(parent); setInput(input); setTitle(ActionMessages.getString("FindStringsToExternalizeAction.dialog.title")); setMessage(ActionMessages.getFormattedString("FindStringsToExternalizeAction.not_externalized", new Object[] {new Integer(count)} )); setContentProvider(new ListContentProvider()); setLabelProvider(createLabelProvider()); } public void create() { setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN); super.create(); } protected Point getInitialSize() { return getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); } protected Control createDialogArea(Composite parent) { Composite result= (Composite)super.createDialogArea(parent); addCheckbox(result); getTableViewer().addSelectionChangedListener(new ISelectionChangedListener(){ public void selectionChanged(SelectionChangedEvent event){ if (fOpenButton != null){ fOpenButton.setEnabled(! getTableViewer().getSelection().isEmpty()); }
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
} }); getTableViewer().getTable().addSelectionListener(new SelectionAdapter(){ public void widgetDefaultSelected(SelectionEvent e) { NonNLSElement element= (NonNLSElement)e.item.getData(); openWizard(element.cu); } }); return result; } private void addCheckbox(Composite result) { fCheckbox= new Button(result, SWT.CHECK); fCheckbox.setText(ActionMessages.getString("FindStringsToExternalizeAction.hide")); fCheckbox.setSelection(loadCheckboxState(true)); if (fCheckbox.getSelection() && ! NonNLSListDialog.this.hasFilters()) getTableViewer().addFilter(new ZeroStringsFilter()); fCheckbox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { storeCheckboxState(NonNLSListDialog.this.fCheckbox.getSelection()); boolean showAll= ! NonNLSListDialog.this.fCheckbox.getSelection(); if (showAll && NonNLSListDialog.this.hasFilters()) NonNLSListDialog.this.getTableViewer().resetFilters(); else if (! showAll && ! NonNLSListDialog.this.hasFilters()) NonNLSListDialog.this.getTableViewer().addFilter(new ZeroStringsFilter()); } }); }
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
protected void createButtonsForButtonBar(Composite parent) { fOpenButton= createButton(parent, OPEN_BUTTON_ID, ActionMessages.getString("FindStringsToExternalizeAction.button.label"), true); fOpenButton.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } protected void buttonPressed(int buttonId) { if (buttonId != OPEN_BUTTON_ID){ super.buttonPressed(buttonId); return; } ISelection s= getTableViewer().getSelection(); if (s instanceof IStructuredSelection){ IStructuredSelection ss= (IStructuredSelection)s; if (ss.getFirstElement() instanceof NonNLSElement) openWizard(((NonNLSElement)ss.getFirstElement()).cu); } } private void openWizard(ICompilationUnit unit) { try { ExternalizeStringsAction.openExternalizeStringsWizard(unit); } catch (JavaModelException e) { ExceptionHandler.handle(e, ActionMessages.getString("FindStringsToExternalizeAction.dialog.title"), ActionMessages.getString("FindStringsToExternalizeAction.error.message")); } } } private static class NonNLSElement{
12,884
Bug 12884 find strings to externalize - should be cancelable
instead of a busy cursor it should show a progress dialog with cancelation
resolved fixed
bccd69d
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:06:44Z
2002-04-05T18:06:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
ICompilationUnit cu; int count; NonNLSElement(ICompilationUnit cu, int count){ this.cu= cu; this.count= count; } } private static class ZeroStringsFilter extends ViewerFilter{ public boolean select(Viewer viewer, Object parentElement, Object element) { return ((NonNLSElement)element).count != 0; } } }
13,056
Bug 13056 can't delete 2 identical methods
class Ad { void f(){}; void f(){}; } you can't delete the 2 f methods (together) it works if you delete them separately
resolved fixed
5bbb09a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:10:09Z
2002-04-09T11:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
package org.eclipse.jdt.internal.ui.reorg; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IImportContainer; import org.eclipse.jdt.core.IImportDeclaration; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IPackageDeclaration; import org.eclipse.jdt.core.ISourceReference; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.refactoring.reorg.SourceReferenceUtil; import org.eclipse.jdt.internal.corext.refactoring.util.WorkingCopyUtil; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringAction; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; abstract class SourceReferenceAction extends RefactoringAction { private ISelectionProvider fSelectionProvider; protected SourceReferenceAction(String name, ISelectionProvider provider) {
13,056
Bug 13056 can't delete 2 identical methods
class Ad { void f(){}; void f(){}; } you can't delete the 2 f methods (together) it works if you delete them separately
resolved fixed
5bbb09a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:10:09Z
2002-04-09T11:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
super(name, provider); fSelectionProvider= provider; } protected ISelectionProvider getSelectionProvider(){ return fSelectionProvider; } /* * @see Action#run */ public final void run() { update(); if (!isEnabled()) return; new BusyIndicator().showWhile(JavaPlugin.getActiveWorkbenchShell().getDisplay(), new Runnable() { public void run() { try { perform(); } catch (CoreException e) { ExceptionHandler.handle(e, getText(), ReorgMessages.getString("SourceReferenceAction.exception")); } } }); } protected ISourceReference[] getElementsToProcess() { return SourceReferenceUtil.removeAllWithParentsSelected(getSelectedElements()); }
13,056
Bug 13056 can't delete 2 identical methods
class Ad { void f(){}; void f(){}; } you can't delete the 2 f methods (together) it works if you delete them separately
resolved fixed
5bbb09a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:10:09Z
2002-04-09T11:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
protected abstract void perform() throws CoreException; /* * @see RefactoringAction#canOperateOn(IStructuredSelection) */ public boolean canOperateOn(IStructuredSelection selection) { try{ if (selection.isEmpty()) return false; Object[] elems= selection.toArray(); for (int i= 0; i < elems.length; i++) { Object elem= elems[i]; if (! canWorkOn(elem)) return false; } return true; } catch (JavaModelException e){ JavaPlugin.log(e); return false; } } private ISourceReference[] getSelectedElements(){ return getWorkingCopyElements(getStructuredSelection().toList()); } private static boolean canWorkOn(Object elem) throws JavaModelException{ if (elem == null) return false;
13,056
Bug 13056 can't delete 2 identical methods
class Ad { void f(){}; void f(){}; } you can't delete the 2 f methods (together) it works if you delete them separately
resolved fixed
5bbb09a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:10:09Z
2002-04-09T11:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
if (! (elem instanceof ISourceReference)) return false; if (! (elem instanceof IJavaElement)) return false; if (elem instanceof IClassFile) return false; if (elem instanceof ICompilationUnit) return false; if ((elem instanceof IMember) && ((IMember)elem).isBinary()) return false; if (isDeletedFromEditor((ISourceReference)elem)) return false; if (elem instanceof IMember) return true; if (elem instanceof IImportContainer) return true; if (elem instanceof IImportDeclaration) return true; if (elem instanceof IPackageDeclaration) return true; return false; } private static boolean isDeletedFromEditor(ISourceReference elem) throws JavaModelException{
13,056
Bug 13056 can't delete 2 identical methods
class Ad { void f(){}; void f(){}; } you can't delete the 2 f methods (together) it works if you delete them separately
resolved fixed
5bbb09a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T09:10:09Z
2002-04-09T11:00:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/SourceReferenceAction.java
ICompilationUnit cu= SourceReferenceUtil.getCompilationUnit(elem); ICompilationUnit wc= WorkingCopyUtil.getWorkingCopyIfExists(cu); if (wc.equals(cu)) return false; IJavaElement element= (IJavaElement)elem; IJavaElement wcElement= JavaModelUtil.findInCompilationUnit(wc, element); return wcElement == null || ! wcElement.exists(); } private static ISourceReference[] getWorkingCopyElements(List l) { List wcList= new ArrayList(l.size()); for (Iterator iter= l.iterator(); iter.hasNext();) { ISourceReference element= (ISourceReference) iter.next(); if (! (element instanceof IJavaElement)) wcList.add(element); ICompilationUnit cu= SourceReferenceUtil.getCompilationUnit(element); ICompilationUnit wc= WorkingCopyUtil.getWorkingCopyIfExists(cu); try { IJavaElement wcElement= JavaModelUtil.findInCompilationUnit(wc, (IJavaElement)element); if (wcElement != null && wcElement.exists()) wcList.add(wcElement); } catch(JavaModelException e) { JavaPlugin.log(e); } } return (ISourceReference[]) wcList.toArray(new ISourceReference[wcList.size()]); } }
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.preferences; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Vector; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.GroupMarker; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextListener; import org.eclipse.jface.text.ITextOperationTarget; import org.eclipse.jface.text.ITextViewer;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
import org.eclipse.jface.text.ITextViewerExtension; import org.eclipse.jface.text.TextEvent; import org.eclipse.jface.text.contentassist.ContentAssistant; import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContentAssistant; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.ITextEditorActionConstants; import org.eclipse.ui.texteditor.IUpdate; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.internal.corext.template.ContextType; import org.eclipse.jdt.internal.corext.template.ContextTypeRegistry; import org.eclipse.jdt.internal.corext.template.Template; import org.eclipse.jdt.internal.corext.template.TemplateContext; import org.eclipse.jdt.internal.corext.template.TemplateMessages; import org.eclipse.jdt.internal.corext.template.TemplateTranslator; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.StatusDialog; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.text.template.TemplateVariableProcessor; import org.eclipse.jdt.internal.ui.util.SWTUtil; /** * Dialog to edit a template. */ public class EditTemplateDialog extends StatusDialog {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
private static class SimpleJavaSourceViewerConfiguration extends JavaSourceViewerConfiguration { private final IContentAssistProcessor fProcessor; SimpleJavaSourceViewerConfiguration(JavaTextTools tools, ITextEditor editor, IContentAssistProcessor processor) { super(tools, editor); fProcessor= processor; } /* * @see SourceViewerConfiguration#getContentAssistant(ISourceViewer) */ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { ContentAssistant assistant= new ContentAssistant(); assistant.setContentAssistProcessor(fProcessor, IDocument.DEFAULT_CONTENT_TYPE); assistant.enableAutoActivation(true); assistant.setAutoActivationDelay(500); assistant.setProposalPopupOrientation(assistant.PROPOSAL_OVERLAY); assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE); assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); Color background= getColorManager().getColor(new RGB(254, 241, 233)); assistant.setContextInformationPopupBackground(background); assistant.setContextSelectorBackground(background); assistant.setProposalSelectorBackground(background); return assistant; } } private static class TextViewerAction extends Action implements IUpdate {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
private int fOperationCode= -1; private ITextOperationTarget fOperationTarget; public TextViewerAction(ITextViewer viewer, int operationCode) { fOperationCode= operationCode; fOperationTarget= viewer.getTextOperationTarget();
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
update(); } /** * Updates the enabled state of the action. * Fires a property change if the enabled state changes. * * @see Action#firePropertyChange(String, Object, Object) */ public void update() { boolean wasEnabled= isEnabled(); boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode)); setEnabled(isEnabled); if (wasEnabled != isEnabled) { firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE); } } /** * @see Action#run() */ public void run() { if (fOperationCode != -1 && fOperationTarget != null) { fOperationTarget.doOperation(fOperationCode); } } } private Template fTemplate;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
private Text fNameText; private Text fDescriptionText; private Combo fContextCombo; private SourceViewer fPatternEditor; private Button fInsertVariableButton; private TemplateTranslator fTranslator= new TemplateTranslator(); private boolean fSuppressError= true; private Map fGlobalActions= new HashMap(10); private List fSelectionActions = new ArrayList(3); private Vector fContextTypes= new Vector(); private final TemplateVariableProcessor fProcessor= new TemplateVariableProcessor(); public EditTemplateDialog(Shell parent, Template template, boolean edit) { super(parent); setShellStyle(getShellStyle() | SWT.MAX | SWT.RESIZE); String title= edit ? TemplateMessages.getString("EditTemplateDialog.title.edit") : TemplateMessages.getString("EditTemplateDialog.title.new"); setTitle(title); fTemplate= template; ContextTypeRegistry registry= ContextTypeRegistry.getInstance(); for (Iterator iterator= registry.iterator(); iterator.hasNext(); ) fContextTypes.add(iterator.next());
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
if (fContextTypes.size() > 0) fProcessor.setContextType(ContextTypeRegistry.getInstance().getContextType((String) fContextTypes.get(0))); } /* * @see Dialog#createDialogArea(Composite) */ protected Control createDialogArea(Composite ancestor) { Composite parent= new Composite(ancestor, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 2; parent.setLayout(layout); parent.setLayoutData(new GridData(GridData.FILL_BOTH)); createLabel(parent, TemplateMessages.getString("EditTemplateDialog.name")); Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); layout= new GridLayout(); layout.numColumns= 3; layout.marginWidth= 0; layout.marginHeight= 0; composite.setLayout(layout); fNameText= createText(composite); fNameText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { if (fSuppressError && (fNameText.getText().trim().length() != 0)) fSuppressError= false; updateButtons(); }
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
}); createLabel(composite, TemplateMessages.getString("EditTemplateDialog.context")); fContextCombo= new Combo(composite, SWT.READ_ONLY); for (Iterator iterator= fContextTypes.iterator(); iterator.hasNext(); ) fContextCombo.add((String) iterator.next()); fContextCombo.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { String name= fContextCombo.getText(); fProcessor.setContextType(ContextTypeRegistry.getInstance().getContextType(name)); } }); createLabel(parent, TemplateMessages.getString("EditTemplateDialog.description")); fDescriptionText= createText(parent); composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_VERTICAL)); layout= new GridLayout(); layout.marginWidth= 0; layout.marginHeight= 0; composite.setLayout(layout); createLabel(composite, TemplateMessages.getString("EditTemplateDialog.pattern")); fPatternEditor= createEditor(parent); Label filler= new Label(composite, SWT.NONE); filler.setLayoutData(new GridData(GridData.FILL_VERTICAL)); fInsertVariableButton= new Button(composite, SWT.NONE); fInsertVariableButton.setLayoutData(getButtonGridData(fInsertVariableButton)); fInsertVariableButton.setText(TemplateMessages.getString("EditTemplateDialog.insert.variable")); fInsertVariableButton.addSelectionListener(new SelectionListener() {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
public void widgetSelected(SelectionEvent e) { fPatternEditor.getTextWidget().setFocus(); fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); } public void widgetDefaultSelected(SelectionEvent e) {} }); fNameText.setText(fTemplate.getName()); fDescriptionText.setText(fTemplate.getDescription()); fContextCombo.select(getIndex(fTemplate.getContextTypeName())); initializeActions(); return composite; } private static GridData getButtonGridData(Button button) { GridData data= new GridData(GridData.FILL_HORIZONTAL); data.heightHint= SWTUtil.getButtonHeigthHint(button); return data; } private static Label createLabel(Composite parent, String name) { Label label= new Label(parent, SWT.NULL); label.setText(name); label.setLayoutData(new GridData()); return label; } private static Text createText(Composite parent) { Text text= new Text(parent, SWT.BORDER); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); return text; }
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
private SourceViewer createEditor(Composite parent) { SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools(); viewer.configure(new SimpleJavaSourceViewerConfiguration(tools, null, fProcessor)); viewer.setEditable(true); viewer.setDocument(new Document(fTemplate.getPattern())); Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT); viewer.getTextWidget().setFont(font); Control control= viewer.getControl(); GridData data= new GridData(GridData.FILL_BOTH); data.widthHint= convertWidthInCharsToPixels(60); data.heightHint= convertHeightInCharsToPixels(5); control.setLayoutData(data); viewer.addTextListener(new ITextListener() { public void textChanged(TextEvent event) { try { fTranslator.translate(event.getDocumentEvent().getDocument().get()); } catch (CoreException e) { JavaPlugin.log(e); } updateUndoAction(); updateButtons(); } }); viewer.addSelectionChangedListener(new ISelectionChangedListener() {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
public void selectionChanged(SelectionChangedEvent event) { updateSelectionDependentActions(); } }); if (viewer instanceof ITextViewerExtension) { ((ITextViewerExtension) viewer).prependVerifyKeyListener(new VerifyKeyListener() { public void verifyKey(VerifyEvent event) { handleVerifyKeyPressed(event); } }); } else { viewer.getTextWidget().addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) { handleKeyPressed(e); } public void keyReleased(KeyEvent e) {} }); } return viewer; } private void handleKeyPressed(KeyEvent event) { if (event.stateMask != SWT.CTRL) return; switch (event.character) { case ' ': fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); break;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
case (int) 'z' - (int) 'a' + 1: fPatternEditor.doOperation(ITextOperationTarget.UNDO); break; } } private void handleVerifyKeyPressed(VerifyEvent event) { if (!event.doit) return; if (event.stateMask != SWT.CTRL) return; switch (event.character) { case ' ': fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); event.doit= false; break; case (int) 'z' - (int) 'a' + 1: fPatternEditor.doOperation(ITextOperationTarget.UNDO); event.doit= false; break; } } private void initializeActions() { TextViewerAction action= new TextViewerAction(fPatternEditor, fPatternEditor.UNDO); action.setText(TemplateMessages.getString("EditTemplateDialog.undo")); fGlobalActions.put(ITextEditorActionConstants.UNDO, action); action= new TextViewerAction(fPatternEditor, fPatternEditor.CUT); action.setText(TemplateMessages.getString("EditTemplateDialog.cut"));
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
fGlobalActions.put(ITextEditorActionConstants.CUT, action); action= new TextViewerAction(fPatternEditor, fPatternEditor.COPY); action.setText(TemplateMessages.getString("EditTemplateDialog.copy")); fGlobalActions.put(ITextEditorActionConstants.COPY, action); action= new TextViewerAction(fPatternEditor, fPatternEditor.PASTE); action.setText(TemplateMessages.getString("EditTemplateDialog.paste")); fGlobalActions.put(ITextEditorActionConstants.PASTE, action); action= new TextViewerAction(fPatternEditor, fPatternEditor.SELECT_ALL); action.setText(TemplateMessages.getString("EditTemplateDialog.select.all")); fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action); action= new TextViewerAction(fPatternEditor, fPatternEditor.CONTENTASSIST_PROPOSALS); action.setText(TemplateMessages.getString("EditTemplateDialog.content.assist")); fGlobalActions.put("ContentAssistProposal", action); fSelectionActions.add(ITextEditorActionConstants.CUT); fSelectionActions.add(ITextEditorActionConstants.COPY); fSelectionActions.add(ITextEditorActionConstants.PASTE); MenuManager manager= new MenuManager(null, null); manager.setRemoveAllWhenShown(true); manager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager mgr) { fillContextMenu(mgr); } }); StyledText text= fPatternEditor.getTextWidget(); Menu menu= manager.createContextMenu(text); text.setMenu(menu); } private void fillContextMenu(IMenuManager menu) {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
menu.add(new GroupMarker(ITextEditorActionConstants.GROUP_UNDO)); menu.appendToGroup(ITextEditorActionConstants.GROUP_UNDO, (IAction) fGlobalActions.get(ITextEditorActionConstants.UNDO)); menu.add(new Separator(ITextEditorActionConstants.GROUP_EDIT)); menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, (IAction) fGlobalActions.get(ITextEditorActionConstants.CUT)); menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, (IAction) fGlobalActions.get(ITextEditorActionConstants.COPY)); menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, (IAction) fGlobalActions.get(ITextEditorActionConstants.PASTE)); menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, (IAction) fGlobalActions.get(ITextEditorActionConstants.SELECT_ALL)); menu.add(new Separator(IContextMenuConstants.GROUP_GENERATE)); menu.appendToGroup(IContextMenuConstants.GROUP_GENERATE, (IAction) fGlobalActions.get("ContentAssistProposal")); } protected void updateSelectionDependentActions() { Iterator iterator= fSelectionActions.iterator(); while (iterator.hasNext()) updateAction((String)iterator.next()); } protected void updateUndoAction() { IAction action= (IAction) fGlobalActions.get(ITextEditorActionConstants.UNDO); if (action instanceof IUpdate) ((IUpdate) action).update(); } protected void updateAction(String actionId) { IAction action= (IAction) fGlobalActions.get(actionId); if (action instanceof IUpdate) ((IUpdate) action).update(); } private int getIndex(String context) { ContextTypeRegistry registry= ContextTypeRegistry.getInstance(); registry.getContextType(context);
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
if (context == null) return -1; return fContextTypes.indexOf(context); } protected void okPressed() { fTemplate.setName(fNameText.getText()); fTemplate.setDescription(fDescriptionText.getText()); fTemplate.setContext(fContextCombo.getText()); fTemplate.setPattern(fPatternEditor.getTextWidget().getText()); super.okPressed(); } private void updateButtons() { boolean valid= fNameText.getText().trim().length() != 0; StatusInfo status= new StatusInfo(); if (!valid) { if (fSuppressError) status.setError(""); else status.setError(TemplateMessages.getString("EditTemplateDialog.error.noname")); } else if (fTranslator.getErrorMessage() != null) { status.setError(fTranslator.getErrorMessage()); } updateStatus(status); } }
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
package org.eclipse.jdt.internal.ui.preferences; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.ColumnWeightData;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.DialogPageContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; import org.eclipse.jdt.ui.text.JavaTextTools; import org.eclipse.jdt.internal.corext.template.ContextType; import org.eclipse.jdt.internal.corext.template.ContextTypeRegistry; import org.eclipse.jdt.internal.corext.template.Template; import org.eclipse.jdt.internal.corext.template.TemplateContext; import org.eclipse.jdt.internal.corext.template.TemplateMessages; import org.eclipse.jdt.internal.corext.template.TemplateSet; import org.eclipse.jdt.internal.corext.template.Templates; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.text.template.TemplateContentProvider; import org.eclipse.jdt.internal.ui.text.template.TemplateLabelProvider; import org.eclipse.jdt.internal.ui.util.SWTUtil; public class TemplatePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
private static final String PREF_FORMAT_TEMPLATES= JavaUI.ID_PLUGIN + ".template.format"; private Templates fTemplates; private CheckboxTableViewer fTableViewer; private Button fAddButton; private Button fEditButton; private Button fImportButton;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
private Button fExportButton; private Button fExportAllButton; private Button fRemoveButton; private Button fEnableAllButton; private Button fDisableAllButton; private SourceViewer fPatternViewer; private Button fFormatButton; public TemplatePreferencePage() { super(); setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore()); setDescription(TemplateMessages.getString("TemplatePreferencePage.message")); fTemplates= Templates.getInstance(); } /** * @see PreferencePage#createContents(Composite) */ protected Control createContents(Composite ancestor) { Composite parent= new Composite(ancestor, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 2; layout.marginHeight= 0; layout.marginWidth= 0; parent.setLayout(layout); Table table= new Table(parent, SWT.CHECK | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION); GridData data= new GridData(GridData.FILL_BOTH); data.widthHint= convertWidthInCharsToPixels(80); data.heightHint= convertHeightInCharsToPixels(10);
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
table.setLayoutData(data); table.setHeaderVisible(true); table.setLinesVisible(true); TableLayout tableLayout= new TableLayout(); table.setLayout(tableLayout); TableColumn column1= new TableColumn(table, SWT.NONE); column1.setText(TemplateMessages.getString("TemplatePreferencePage.column.name")); TableColumn column2= new TableColumn(table, SWT.NONE); column2.setText(TemplateMessages.getString("TemplatePreferencePage.column.context")); TableColumn column3= new TableColumn(table, SWT.NONE); column3.setText(TemplateMessages.getString("TemplatePreferencePage.column.description")); tableLayout.addColumnData(new ColumnWeightData(30)); tableLayout.addColumnData(new ColumnWeightData(20)); tableLayout.addColumnData(new ColumnWeightData(70)); fTableViewer= new CheckboxTableViewer(table); fTableViewer.setLabelProvider(new TemplateLabelProvider()); fTableViewer.setContentProvider(new TemplateContentProvider()); fTableViewer.setSorter(new ViewerSorter() { public int compare(Viewer viewer, Object object1, Object object2) { if ((object1 instanceof Template) && (object2 instanceof Template)) { Template left= (Template) object1; Template right= (Template) object2; int result= left.getName().compareToIgnoreCase(right.getName()); if (result != 0) return result; return left.getDescription().compareToIgnoreCase(right.getDescription()); }
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
return super.compare(viewer, object1, object2); } public boolean isSorterProperty(Object element, String property) { return true; } }); fTableViewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent e) { edit(); } }); fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent e) { selectionChanged1(); } }); fTableViewer.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { Template template= (Template) event.getElement(); template.setEnabled(event.getChecked()); } }); Composite buttons= new Composite(parent, SWT.NULL); buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0;
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
buttons.setLayout(layout); fAddButton= new Button(buttons, SWT.PUSH); fAddButton.setLayoutData(getButtonGridData(fAddButton)); fAddButton.setText(TemplateMessages.getString("TemplatePreferencePage.new")); fAddButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { add(); } }); fEditButton= new Button(buttons, SWT.PUSH); fEditButton.setLayoutData(getButtonGridData(fEditButton)); fEditButton.setText(TemplateMessages.getString("TemplatePreferencePage.edit")); fEditButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { edit(); } }); fRemoveButton= new Button(buttons, SWT.PUSH); fRemoveButton.setLayoutData(getButtonGridData(fRemoveButton)); fRemoveButton.setText(TemplateMessages.getString("TemplatePreferencePage.remove")); fRemoveButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { remove(); } }); createSpacer(buttons); fImportButton= new Button(buttons, SWT.PUSH); fImportButton.setLayoutData(getButtonGridData(fImportButton));
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
fImportButton.setText(TemplateMessages.getString("TemplatePreferencePage.import")); fImportButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { import_(); } }); fExportButton= new Button(buttons, SWT.PUSH); fExportButton.setLayoutData(getButtonGridData(fExportButton)); fExportButton.setText(TemplateMessages.getString("TemplatePreferencePage.export")); fExportButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { export(); } }); fExportAllButton= new Button(buttons, SWT.PUSH); fExportAllButton.setLayoutData(getButtonGridData(fExportAllButton)); fExportAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.export.all")); fExportAllButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { exportAll(); } }); createSpacer(buttons); fEnableAllButton= new Button(buttons, SWT.PUSH); fEnableAllButton.setLayoutData(getButtonGridData(fEnableAllButton)); fEnableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.enable.all")); fEnableAllButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { enableAll(true);
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
} }); fDisableAllButton= new Button(buttons, SWT.PUSH); fDisableAllButton.setLayoutData(getButtonGridData(fDisableAllButton)); fDisableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.disable.all")); fDisableAllButton.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { enableAll(false); } }); fPatternViewer= createViewer(parent); createSpacer(parent); fFormatButton= new Button(parent, SWT.CHECK); fFormatButton.setText(TemplateMessages.getString("TemplatePreferencePage.use.code.formatter")); fTableViewer.setInput(fTemplates); fTableViewer.setAllChecked(false); fTableViewer.setCheckedElements(getEnabledTemplates()); IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); fFormatButton.setSelection(prefs.getBoolean(PREF_FORMAT_TEMPLATES)); updateButtons(); WorkbenchHelp.setHelp(parent, IJavaHelpContextIds.TEMPLATE_PREFERENCE_PAGE); return parent; } private Template[] getEnabledTemplates() { Template[] templates= fTemplates.getTemplates(); List list= new ArrayList(templates.length);
8,082
Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
resolved fixed
e63e83a
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-04-12T10:04:23Z
2002-01-23T12:46:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
for (int i= 0; i != templates.length; i++) if (templates[i].isEnabled()) list.add(templates[i]); return (Template[]) list.toArray(new Template[list.size()]); } private SourceViewer createViewer(Composite parent) { Label label= new Label(parent, SWT.NONE); label.setText("Preview:"); GridData data= new GridData(); data.horizontalSpan= 2; label.setLayoutData(data); SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools(); viewer.configure(new JavaSourceViewerConfiguration(tools, null)); viewer.setEditable(false); viewer.setDocument(new Document()); viewer.getTextWidget().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT); viewer.getTextWidget().setFont(font); Control control= viewer.getControl(); data= new GridData(GridData.FILL_BOTH); data.heightHint= convertHeightInCharsToPixels(5); control.setLayoutData(data);